Mirage Source
Fill Tile Button - Printable Version

+- Mirage Source (https://mirage-engine.uk/forums)
+-- Forum: Mirage Source (Nostalgia) (https://mirage-engine.uk/forums/forumdisplay.php?fid=61)
+--- Forum: Archive (2006-2011) (https://mirage-engine.uk/forums/forumdisplay.php?fid=18)
+---- Forum: Resources (https://mirage-engine.uk/forums/forumdisplay.php?fid=49)
+---- Thread: Fill Tile Button (/showthread.php?tid=1505)



Fill Tile Button - Anthony - 12-01-2008

I noticed there wasn't a tutorial for a Fill button. Decided to make one quickly.

Difficulty 1/5 - Simple Copy/Paste

Client Side

Go to frmMirage and add a command button to your map editor and name it cmdFill. Double click it to open the code and add this between the sub that appears.

Code:
Call EditorFillLayer

Then find EditorClearAttribs sub in modGameLogic and underneath that sub add this new sub.

Code:
Public Sub EditorFillLayer()
Dim y As Long
Dim x As Long
    For y = 0 To MAX_MAPY
        For x = 0 To MAX_MAPX
            If frmMirage.optLayers.Value = True Then
                    With Map.Tile(x, y)
                        If frmMirage.optGround.Value = True Then .Ground = EditorTileY * 7 + EditorTileX
                        If frmMirage.optMask.Value = True Then .Mask = EditorTileY * 7 + EditorTileX
                        If frmMirage.optAnim.Value = True Then .Anim = EditorTileY * 7 + EditorTileX
                        If frmMirage.optFringe.Value = True Then .Fringe = EditorTileY * 7 + EditorTileX
                        End With
                End If
        Next x
    Next y
End Sub

I am not sure if the 7 should be something else? Not sure what vanilla MSE is, I can't remember Tongue. So if it's filling a different tile than what you clicked on then change it to whatever yours is supposed to be. If that makes sense haha. Thats all.


Re: Fill Tile Button - Robin - 12-01-2008

Already been made xD

Thanks anyway.


Re: Fill Tile Button - Anthony - 13-01-2008

Oh haha, I couldn't find one Tongue. Oh well..


Re: Fill Tile Button - Rezeyu - 13-01-2008

Actually there's 3.

One fill, one attribute fill, then one more that did something odd..
Can't recall.


Re: Fill Tile Button - Anthony - 13-01-2008

Ah I see it now and I did before but didn't read the entire post Tongue. Just looked at the attribute fill part and skipped over the layer fill.


Re: Fill Tile Button - DarkX - 13-09-2008

Sorry for necroing, but there is a fill attribute, fill layer, and then there is one that combines both of them into one button.


Re: Fill Tile Button - Robin - 13-09-2008

JEUSUS FUCKING CHIRST MAN WTF!

LOCKED