Poll: Is this actually useful?
You do not have permission to vote in this poll.
I find it very useful
82.35%
14 82.35%
I'll use it.
5.88%
1 5.88%
It's good, but not for ME.
11.76%
2 11.76%
Maybe in an off branch game
0%
0 0%
Why would I use that?
0%
0 0%
It's absolute garbage, throw it out.
0%
0 0%
Total 17 vote(s) 100%
* You voted for this item. [Show Results]

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
1Fill/1Clear button
#1
Tutorial By: DarkX
Codes Tested on: MS3.0.3.;MS3.0.7. and MSE They all worked

Ok I was getting annoyed with havingto re-edit the code in each thing, when I added a new layer or attribute, so I decided to write up a code that makes it so you only have to use one of the buttons.

Code:
Private Sub cmdFill_Click()
Dim Y As Long
Dim X As Long

X = MsgBox("Are you sure you want to fill the map?", vbYesNo)
If X = vbNo Then
    Exit Sub
End If

If optAttribs.Value = False Then
    For Y = 0 To MAX_MAPY
        For X = 0 To MAX_MAPX
            With Map.Tile(X, Y)
                If optGround.Value = True Then .Ground = EditorTileY * 14 + EditorTileX
                If optMask.Value = True Then .Mask = EditorTileY * 14 + EditorTileX
                If optAnim.Value = True Then .Anim = EditorTileY * 14 + EditorTileX
                If optMask2.Value = True Then .Mask2 = EditorTileY * 14 + EditorTileX
                If optM2Anim.Value = True Then .M2Anim = EditorTileY * 14 + EditorTileX
                If optFringe.Value = True Then .Fringe = EditorTileY * 14 + EditorTileX
                If optFAnim.Value = True Then .FAnim = EditorTileY * 14 + EditorTileX
                If optFringe2.Value = True Then .Fringe2 = EditorTileY * 14 + EditorTileX
                If optF2Anim.Value = True Then .F2Anim = EditorTileY * 14 + EditorTileX
            End With
        Next X
    Next Y
Else
        For Y = 0 To MAX_MAPY
            For X = 0 To MAX_MAPX
                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
        Next X
    Next Y
End If
End Sub
This is the code for 1 fill button for both attribute and layers.

PART 2

Also I made a code that makes use of only using one cmdClear button, the code is rather simple, here it is.
Code:
Private Sub cmdClear_Click()
If optAttribs.Value = False Then
    Call EditorClearLayer
    Else
    Call EditorClearAttribs
  End If
End Sub
Most of you are probably saying, how stupid is that, if you don't like it don't use it, if you feel free.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)