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

[Trigger] Damage value

Status
Not open for further replies.
Level 4
Joined
Sep 23, 2010
Messages
88
It's so complicated :/ I don't understand a thing... Another question: Can I get how many life unit has before he gets damaged?
 
Level 11
Joined
Nov 15, 2007
Messages
800
If you're using the GUI Damage Engine, "(Life of DamageEventTarget) + (DamageEventAmount)" should give you their HP before the damage.
 
Level 4
Joined
Sep 23, 2010
Messages
88
How and where do I put the "(Life of DamageEventTarget) + (DamageEventAmount)"? Don't blame me I'm such a noob :(

PS: I followed the instruction on how to install the GUI Damage Engine and it doesn't say I have to add variables, but the world editor disables those triggers because it leaks variables... What to do?
 
Last edited:
Level 11
Joined
Nov 15, 2007
Messages
800
The world editor doesn't disable triggers because they leak. Post the error message you're getting word for word.
 
Level 4
Joined
Sep 23, 2010
Messages
88
The world editor doesn't disable triggers because they leak. Post the error message you're getting word for word.

Make a trigger setting a variable then delete the variable and the trigger will be disabled.
 
Level 4
Joined
Sep 23, 2010
Messages
88
The current life of the triggering unit in response to a damage event is the life the unit has before the damage is dealt. The damage response event fires before damage is dealt to the unit's life.
You mean I could do:
  • LifeBeforeDamage
    • Events
      • Unit - A unit Is attacked
    • Conditions
    • Actions
      • Set LifeBfrDamage = (Life of (Attacked unit))
And that would be the life of the unit before he gets damaged?

Edit: Just tested out, it worked. Didn't saw the kStiyl comment, it was the most accurate to what I needed. Thank you all for helping me :)
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
And that would be the life of the unit before he gets damaged?
No, because that trigger is not hooked with a damage response event. You are just sampling the life of the unit when another unit attacks it. Remember that attacks fire when a unit initiates an attack sequence and have nothing to do with damage or even if the attack complets (you can interupt an attack before the unit fires a projectile / lands a hit).
 
Status
Not open for further replies.
Top