• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Unit Selected Detection

Status
Not open for further replies.
Level 11
Joined
Sep 12, 2008
Messages
657
so.. how did sotdrp makers did that?
im pretty sure they checked if the unit is selected in a sub if/then/else, and if hes still inside the group, keep him inside, but if he isnt, remove him from the group, but i aint sure..
 
you could use the chaos ability to replace the unit (or if that does not work bear form if its unit and metamorphosis if its hero)

also GUI selection triggers use GetLocalPlayer so you might want to check in multiplayer if you get desyncs
(maybe "call SyncSelections()" can fix that but for me it did not)

there also is a selection/deselection event for units
refer to the selected unit with triggering unit
maybe helpful for you
 
Level 8
Joined
Jun 28, 2008
Messages
356
I don't know if GUI has it, but in JASS you can always SyncSelections() and then Enumerate through the units and check if a given unit is there and if it is, replace it and SelectUnit(new_created_unit, true);

:|
 
Status
Not open for further replies.
Top