Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to make a frmMapEditor
#1
Made it with help of William, Robin, Advocate and Obsidian. Because of my lak of ability in being creative with my code, and not having a basic rundown on how to do it.

I'll share the way how I did it.

//:::::::::::::::::::::\\
||:::::Client Side::::||
\\::::::::::::::::::::://

Make a new form and call it: frmMapEditor

In frmMirage find the picMapEditor, cut it.
Paste It in your frmMapEditor.
Set the picMapEditor's visibility attribute to TRUE

in frmMirage's code find:

Code:
' // MAP EDITOR STUFF //

Private Sub optAttribs_Click()
    If optAttribs.Value = True Then
        fraLayers.Visible = False
        fraAttribs.Visible = True
    End If
End Sub
Private Sub picBackSelect_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
    Call EditorChooseTile(Button, Shift, x, y)
End Sub

Private Sub picBackSelect_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
    Call EditorChooseTile(Button, Shift, x, y)
End Sub

Private Sub cmdSend_Click()
    Call EditorSend
End Sub

Private Sub cmdCancel_Click()
    Call EditorCancel
End Sub

Private Sub cmdProperties_Click()
    frmMapProperties.Show vbModal
End Sub

Private Sub optWarp_Click()
    frmMapWarp.Show vbModal
End Sub

Private Sub optItem_Click()
    frmMapItem.Show vbModal
End Sub

Private Sub optKey_Click()
    frmMapKey.Show vbModal
End Sub

Private Sub optKeyOpen_Click()
    frmKeyOpen.Show vbModal
End Sub

Private Sub scrlPicture_Change()
    Call EditorTileScroll
End Sub

Private Sub cmdClear_Click()
    Call EditorClearLayer
End Sub

Private Sub cmdClear2_Click()
    Call EditorClearAttribs
End Sub

Cut this and paste it in the frmMapeditor's code.

In modHandleData find:

Code:
frmMirage.picMapEditor.Visible = False

and change it with

Code:
frmMapeditor.Visible = False

In modGameLogic find:

Code:
Public Sub EditorInit()
frmMirage.picMapEditor.Visible = True
    With frmMirage.picMapEditor.picBackselect

And replace it with:

Code:
Public Sub EditorInit()
frmMapEditor.Visible = True
    With frmMapEditor.picBackSelect

Find:

Code:
Public Sub EditorMouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)

Replace the whole sub with:

[code]
Public Sub EditorMouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
Dim x1, y1 As Long

If InEditor Then
x1 = Int(x / PIC_X)
y1 = Int(y / PIC_Y)
If (Button = 1) And (x1 >= 0) And (x1 = 0) And (y1 = 0) And (x1 = 0) And (y1
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)