[JASS] Any unit takes damage

Status
Not open for further replies.
Registering events require 3 parameters:
1) The trigger you're adding the event to
2) In the case of Unit events: a unit
3) The actual event: in this case EVENT_UNIT_DAMAGE
The result should look like
TriggerRegisterUnitEvent(gg_trg_mytrigger, myunitvar, EVENT_UNIT_DAMAGE)
Thus, you'll need an event for each separate unit entity...
 
Unfortunately, you cannot detect when ANY unit takes damage, it is unit specific. However, because of handle systems, you can use a call TriggerRegisterAnyUnitEventBJ(trig, EVENT_PLAYER_UNIT_ATTACKED), then attach that unit to create another trigger and work from there.
 
its not any unit takes damage
its unit gets attacked
there is no AnyUnitTakesDamage in JASS by default

I have this
Requires this tool

U seem quite new
That tool can help you (shows functions and what they take)
and the system I linked has
TriggerRegisterDamageEvent(<trigger>)
 
Status
Not open for further replies.
Back
Top