[vJASS] Unit from Unit group is selected (event)

Status
Not open for further replies.
Level 19
Joined
Oct 12, 2007
Messages
1,821
I'm working on something for my map, but I can't seem to figure this out in a good way.

There's a certain rect in the map where once in a while units enter and leave.
Whenever a player (has to be MPI) selects a unit he owns in the rect, something will have to happen.
I don't know how to get started on this because the events I know of ask for specific units.

Could someone help me to get started with this? Or point me in the right direction?
 
Well, you could keep track of units that are in that given rect. A static group and two events (1 for enter 1 for leave), and a third one for unit selection will do the trick.

However, using this approach, you can have a static timer with 32 timouts/sec, that sets a boolean based on whether the unit is selected by its owner or not, and fires the appropriate events when it changes.
 
I got it to work now.
A (small) delay isn't even a big issue.
I used the player X (de)selects a unit event.
 
Status
Not open for further replies.
Back
Top