Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[3.78] Help with Making it where shift selects multiple tile
#2
I havent played with mirage in about a year, but I made this from scratch so lemme see....

If you don't know how to do any part of this, I would open a source that has it for reference (elysium), DONT rip the whole thing *shudders*

steps:
detect the shift key (could be in gameloop, in the mapeditor draw section OR inside the function that detects mouse clicks in the map editor)
set a variable to current tile coords
set the red box to be drawn from first coords to current coords
in the section where the program blits the mask, have an if to check for the red box dimensions
if dimension = spriteX by spriteY >> blit regularly ELSE blit dimensions of red box
**if your tileset has a scrollbar, than make sure when you set the blit area to include the additional area (scrollbar_value * spriteY + redbox.top)

this isnt the best system, you should probably set up a couple global variables instead of recalling the red box's dimensions. good luck.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)