Unit Takes Damage Event

Sim

Forum Administrator
Staff member
Reaction score
534
Trigger:
  • DamageTriggerAdd
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
      • *whatever
    • Actions
      • Trigger - Add to DamageTrigger <gen> the event ((Triggering unit) Takes damage)


Then, your trigger named DamageTrigger should have an empty list of events, which will get filled with specific events for each unit entering the map.
Refer to the unit being damaged with (Triggering unit), while the source is referred through (Damage source).
 

chukky-jr

Member
Reaction score
15
Trigger:
  • DamageTriggerAdd
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
      • *whatever
    • Actions
      • Trigger - Add to DamageTrigger <gen> the event ((Triggering unit) Takes damage)


Then, your trigger named DamageTrigger should have an empty list of events, which will get filled with specific events for each unit entering the map.
Refer to the unit being damaged with (Triggering unit), while the source is referred through (Damage source).

the event is indeed "triggering unit takes damage"
i already done that, my next problem was checking who is the source of the damage, i did that by adding condition GetEventDamageSource to the DamageTrigger (it works fine, i convert DamageTrigger to custom script). i think i didn't make myself clear enough...

my next problem is the source damage weapon type, what was it called? EVENT_GET_WEAPON_TYPE, Weapon_type_whoknows ? i'm looking for damage type universal and physical
 

Sim

Forum Administrator
Staff member
Reaction score
534
Weapon Types and Damage Types are indeed named DAMAGE_TYPE_something but they can't be recalled through functions. They're global variables passed when dealing damage.

> i already done that, my next problem was checking who is the source of the damage, i did that by adding condition GetEventDamageSource to the DamageTrigger (it works fine, i convert DamageTrigger to custom script). i think i didn't make myself clear enough...

You don't need to convert anything to custom text. I just told you:

> while the source is referred through (Damage source).

Event response - Damage Source is the key here.

It's in GUI. It refers to, well, the Source of the damage.
 

chukky-jr

Member
Reaction score
15
You don't need to convert anything to custom text. I just told you:

> while the source is referred through (Damage source).

Event response - Damage Source is the key here.

It's in GUI. It refers to, well, the Source of the damage.

wait, there is such Event Response..? my WE's GUI doesn't have it...
 

chukky-jr

Member
Reaction score
15
wtf.. yeah it is there. thx a lot guys

but about weapon type, can some1 enlighten me about trigger that checks it?
 

tommerbob

Minecraft. :D
Reaction score
110
As far as I know, there is no way you can check for Weapon/Damage type, even in Jass. That's why systems like J4L's Damage are so incredibly useful, and that's why I recommend using a system. It's makes your work so much easier and more effective.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top