[Trigger] Damage value

Status
Not open for further replies.
It's so complicated :/ I don't understand a thing... Another question: Can I get how many life unit has before he gets damaged?
 
If you're using the GUI Damage Engine, "(Life of DamageEventTarget) + (DamageEventAmount)" should give you their HP before the damage.
 
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:
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.
 
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 :)
 
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.
Back
Top