Damage Taken

Jazradel

Helping people do more by doing less.
Reaction score
102
How can you get the damage dealt to a unit? This is actual damage dealt to the unit including armour. e.g. HP loss.

Or the damage an attack does to a unit(actual HP loss).
 

Rad

...
Reaction score
228
Use the Integer <Damage Taken>, but you need "A unit takes damage" which is a specific unit event.
 

Jazradel

Helping people do more by doing less.
Reaction score
102
Hmmm.... Thanks Rad. Another half solution(remeber player casting spell? still need to find another way to do that). It's a pity it needs that event(by specific do you mean it has to be <Hero> takes damage or just a Unit takes damage). I guess I can work around that though.

Anyway can I do it with Jass?
 

Rad

...
Reaction score
228
Heres the only tip i can really give you

Trigger - Add new event

Use a variable with the specific unit named "Hero Target" and use another trigger to change that unit when using the generic 'is attacked' (which is fired usually .5 seconds before takes damage, the animation backswing etc effect the damage point. Well and the damage point ^^)
 

Jazradel

Helping people do more by doing less.
Reaction score
102
So your saying:
Code:
Event - Unit is Attacked
Condition - Attacking Unit is Hero
Actions - Set Target to Attacked Unit
Code:
Event - Target takes damage
Actions - Set damagedealt to Interger(Damage Dealt)
Oh wait you can't use Variable in <Unit> does whater can you. As soon as I get back to World Editor I'll see what your saying.
 

xPheRe

New Member
Reaction score
43
RAD say something like this
Code:
AttackTrigger
Events
    Unit is attacked
Conditions
Actions
    --- Here "Damage taken" has no meaning ---
    Add to (DamageTrigger) the event (Attacked unit takes damage)
Code:
DamageTrigger
Events
Conditions
Actions
    --- Here "Damage taken" has meaning ---
 
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