• 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.

[JASS] Any unit takes damage

Status
Not open for further replies.
Level 21
Joined
Aug 21, 2005
Messages
3,699
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...
 
Level 6
Joined
Jun 30, 2006
Messages
230
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.
 
Level 19
Joined
Aug 24, 2007
Messages
2,888
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.
Top