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!
trigger whichTrigger: by default this is something like "gg_trg_TRIGGER_NAME".
unit whichUnit: pre-placed units can be used once you use an action in GUI that uses that unit.
Then it becomes "gg_unit_rawId_integer".
Example: if it's a footman (id: 'hfoo') and it is the 8th unit in the map (the order in which you placed them, can be seen by clicking on the unit in the editor), it will become "gg_unit_hfoo_0008".
unitevent whichEvent, this is the list:
JASS:
// Unit Events
constant unitevent EVENT_UNIT_DAMAGED
constant unitevent EVENT_UNIT_DEATH
constant unitevent EVENT_UNIT_DECAY
constant unitevent EVENT_UNIT_DETECTED
constant unitevent EVENT_UNIT_HIDDEN
constant unitevent EVENT_UNIT_SELECTED
constant unitevent EVENT_UNIT_DESELECTED
constant unitevent EVENT_UNIT_STATE_LIMIT
// Events which may have a filter for the "other unit"
//
constant unitevent EVENT_UNIT_ACQUIRED_TARGET
constant unitevent EVENT_UNIT_TARGET_IN_RANGE
constant unitevent EVENT_UNIT_ATTACKED
constant unitevent EVENT_UNIT_RESCUED
constant unitevent EVENT_UNIT_CONSTRUCT_CANCEL
constant unitevent EVENT_UNIT_CONSTRUCT_FINISH
constant unitevent EVENT_UNIT_UPGRADE_START
constant unitevent EVENT_UNIT_UPGRADE_CANCEL
constant unitevent EVENT_UNIT_UPGRADE_FINISH
// Events which involve the specified unit performing
// training of other units
//
constant unitevent EVENT_UNIT_TRAIN_START
constant unitevent EVENT_UNIT_TRAIN_CANCEL
constant unitevent EVENT_UNIT_TRAIN_FINISH
constant unitevent EVENT_UNIT_RESEARCH_START
constant unitevent EVENT_UNIT_RESEARCH_CANCEL
constant unitevent EVENT_UNIT_RESEARCH_FINISH
constant unitevent EVENT_UNIT_ISSUED_ORDER
constant unitevent EVENT_UNIT_ISSUED_POINT_ORDER
constant unitevent EVENT_UNIT_ISSUED_TARGET_ORDER
constant unitevent EVENT_UNIT_HERO_LEVEL
constant unitevent EVENT_UNIT_HERO_SKILL
constant unitevent EVENT_UNIT_HERO_REVIVABLE
constant unitevent EVENT_UNIT_HERO_REVIVE_START
constant unitevent EVENT_UNIT_HERO_REVIVE_CANCEL
constant unitevent EVENT_UNIT_HERO_REVIVE_FINISH
constant unitevent EVENT_UNIT_SUMMON
constant unitevent EVENT_UNIT_DROP_ITEM
constant unitevent EVENT_UNIT_PICKUP_ITEM
constant unitevent EVENT_UNIT_USE_ITEM
Search for what you want to detect, and use the "EVENT_UNIT_WHATEVER" of that.
You could've created the event in GUI and then converted it to JASS, that should've instantly given you the answer.
You sure you're going to be okay by the way?
Do you have JNGP (Jass NewGen Project)?
In that editor, you can right-click on any function to see how they work.
When you right-click the BJ that registers any unit action, you will see how you can use the native for that.
In my previous post, I also explained which native you could use and explained the values, maybe you should pay some attention to that?
In any case: using the BJ for "get any unit action" isn't even a bad BJ, you can use that if you wish.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.