Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[3.78] Help with Making it where shift selects multiple tile
#1
Yeah. I can't really figure it out for some reason. I know I have to code in where they press the shift button while the map editor is open of course and then click, but I can't really figure out what code I would use to make it work right o.o..
I'm using 3.78.
Reply
#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
#3
There's a tutorial for this. I just used it last night cause I'm lazy. Big Grin
Reply
#4
I went to elysium*shudder* and it didn't exactly help. I got so many errors on load that i just exited out and gave up for the night. xD
EDIT: And I can't find the tutorial >_
Reply
#5
http://web.miragesource.com/old-tutoria ... elect.html

You'll have to tweak it a bit to work with MS4, but not by much.
Reply
#6
Alright. I'm working on that. xD
Trying my best, not working :l
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)