| Mirage Source http://miragesource.net/forums/ |
|
| Attribute editor fill button/Map Editor Fill Button http://miragesource.net/forums/viewtopic.php?f=210&t=400 |
Page 1 of 1 |
| Author: | DarkX [ Sun Aug 20, 2006 5:31 am ] |
| Post subject: | Attribute editor fill button/Map Editor Fill Button |
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!!!!!! |
|
| Author: | Trekz [ Sun Aug 20, 2006 5:49 am ] |
| Post subject: | |
aight i get what the fill does, but whats the point of fill attribute |
|
| Author: | DarkX [ Sun Aug 20, 2006 5:57 am ] |
| Post subject: | |
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. |
|
| Author: | Trekz [ Sun Aug 20, 2006 9:27 am ] |
| Post subject: | |
OHHH i get it lol, its to fill the atributes |
|
| Author: | DarkX [ Sun Aug 20, 2006 6:11 pm ] |
| Post subject: | |
LOL, np. |
|
| Page 1 of 1 | All times are UTC |
| Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |
|