Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Attribute editor fill button/Map Editor Fill Button
#1
Tutorial/Code by: DarkX
(Refrence for this code is from the second part of the tutorial)

Ok this is my first actual tutorial, ONLY the first half is mine, here is the tutorial for any one who hasn't already figured it out: Attribute fill button!

open frmMirage and find your mapeditor then the attributes part, then make a new command button name it cmdFill2 with the caption Fill then double click it and the code below.

Code:
Private Sub cmdFill2_Click()
Dim y As Long
Dim x As Long
For y = 0 To MAX_MAPY
For x = 0 To MAX_MAPX
If frmMirage.optAttribs.Value = True Then
With Map.Tile(x, y)
If frmMirage.optBlocked.Value = True Then .Type = TILE_TYPE_BLOCKED
If frmMirage.optWarp.Value = True Then .Type = TILE_TYPE_WARP
'If frmMirage.optKill.Value = True Then .Type = TILE_TYPE_KILL
If frmMirage.optItem.Value = True Then .Type = TILE_TYPE_ITEM
'If frmMirage.optHeal.Value = True Then .Type = TILE_TYPE_HEAL
If frmMirage.optNpcAvoid.Value = True Then .Type = TILE_TYPE_NPCAVOID
If frmMirage.optKey.Value = True Then .Type = TILE_TYPE_KEY
If frmMirage.optKeyOpen.Value = True Then .Type = TILE_TYPE_KEYOPEN
End With
End If
Next x
Next y
End Sub
If you have the TILE_TYPE_KILL and TILE_TYPE_HEAL in your version then take out the ' behind each of them. to add more of them just add another line of code like this(do be sure to add the names of the option buttons you have).
Code:
If frmMirage.optW/E.Value = True Then .Type = TILE_TYPE_W/E
Thats all, now test it out, you should now have a working attrib fill button.

-------------------------------------------------------------------------------------
Ok here's the 2nd part for the map editor fill button
Tutorial/Code by: Lucidar

'make a button called cmdFill
'put the following code inside it:
'
Code:
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.optMask2.Value = True Then .Mask2 = EditorTileY * 7 + EditorTileX
'If frmMirage.optM2Anim.Value = True Then .M2Anim = EditorTileY * 7 + EditorTileX
If frmMirage.optFringe.Value = True Then .Fringe = EditorTileY * 7 + EditorTileX
'If frmMirage.optFAnim.Value = True Then .FAnim = EditorTileY * 7 + EditorTileX
'If frmMirage.optFringe2.Value = True Then .Fringe2 = EditorTileY * 7 + EditorTileX
'If frmMirage.optF2Anim.Value = True Then .F2Anim = EditorTileY * 7 + EditorTileX
End With
End If
Next x
Next y
'If you have the extra layers added, just remove the ' from each tile you have.

'With a little editting you can do the same for attributes
'and thaTS ALLL!!!!!!
Reply
#2
aight i get what the fill does, but whats the point of fill attribute
Reply
#3
the map editorfill button is for lazy people who want the whole map one graphic type, but don't want to wave their hands around on the mouse for 5 seconds.

The Attribute fill button is for people who want to make the map either mostly blocked or mostly npcavoid, but are to lazy to wave their hands over the sreen acouple times.
Reply
#4
OHHH i get it lol, its to fill the atributes Big Grin i though u meant it was like a Fill atribute wich u place on the map so i was like wtf.
Reply
#5
LOL, np.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)