I am planning to do a Real Time Strategy game when Iīm finishīd with my current game but I donīt know how to the box you draw to mark units. You know, you press a cordinate with the mouse and then move the mouse and there it appears a box from the cordinate to the mouse as marks all units beneath it, (it is used in almost every RTS strategygame.)
So I wonder, can someone tell me how to do this or point me at an FAQ or something like that.
Klikmaster: I use MMF but how do I use active system box for that?
Retainer Iīll test your file after school.
n/a
Assault Andy Administrator
I make other people create vaporware
Registered 29/07/2002
Points 5686
16th January, 2006 at 09:20:51 -
Create 4 Actives, one for each corner.
Always set Active1's position to the point where you first clicked.
Always set Active2's x position to the point you clicked, but set it's y position to the current mouse Y
Always set Active3's y position to the point you clicked, but set it's x position to the current mouse X
Always set Active4's position to the point where your mouse currently is.
You can then add another 4 active systemboxes which are just 2x2 pixels in size, and make them stretch between each of the four corners. People are saying to use Active System boxes, because their image wraps.
Hmm, I think I get it. But how does I do so the units inside the box being marked? Tell me if I have wrong but isnīt the box just a box with nothing within? You have a box but how does it mark the units?
Edited by the Author.
n/a
Assault Andy Administrator
I make other people create vaporware
Registered 29/07/2002
Points 5686
16th January, 2006 at 12:31:54 -
X of unit is less than right detector + X of unit is greater than left detector + Y of unit is great than top detector + Y of unit is lower than bottom detector = Unit is selected.
Um, Assault Andy, it's an active system BOX, why have 4 of them for lines when you can use them for a box? Just make it transparent with a border. U only need 1 active system box, no actives