Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Dont call map editor when moving mouse but staying on same t
#1
ile


Basicly, if you move your mouse while it's pressed, the map editor lays down a tile. Even though that tile is already there. Not required, easy fix

Private Sub picScreen_MouseMove
Code:
If CurX = X \ PIX_X And CurY = Y \ PIC_Y And Button = vbLeftButton Then Exit Sub

And right above that, under If InEditor Then add
Code:
CurX = 100
        CurY = 100

Just to make sure you can edit a tile you just placed.
Reply
#2
Code:
CurX = 100
        CurY = 100
Joost, please explain..
Reply
#3
I probably added that to reset the X and Y if you select a different tile, because (0,0) is a tile, I couldn't set them both to 0. Best way would've been setting them to MAX Y/X + 1 or something, but 100 works as welll Big Grin
Reply
#4
It appears you reset curx and y, and then check if you were on the same tile as the reset values, which means

Code:
If CurX = X \ PIX_X And CurY = Y \ PIC_Y And Button = vbLeftButton Then Exit Sub
will never get called.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)