• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

Life Steal with triggers

Status
Not open for further replies.
Level 26
Joined
Dec 3, 2018
Messages
874
I made this but it doesn't work Im confused
  • life when attacking 5
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Level of +5 life when attacking for (Attacking unit)) Greater than or equal to 1
    • Actions
      • Unit - Set life of (Attacking unit) to ((Life of (Attacking unit)) + ((Unit: (Attacking unit)'s Weapon Real Field: Attack Damage Point ('udp1') at Index:2) / 1.00))
 
Level 24
Joined
Feb 9, 2009
Messages
1,787
It's working but you are refering to the animation of the unit's basic attack.
1640756052413.png


If you are looking for "Base Damage" like I think you are you should do:
1640756217695.png


But do note that the damage of a unit is varied based on their dice attached to their attack.
1640756291222.png

Example Villager has 5 - 6 damage, or
(Base Damage) + (between (Number of dice) & (Sides per Die))


Lastly be aware that this trigger will not apply at the point of damage but when the unit attempts to attack, meaning if you can trigger this when you don't want to.
I'd suggest a damage detection system like Bribe's damage engine.
With it you can make triggers like this easily:
  • example
    • Events
      • Game - DamageEvent becomes Equal to 1.00
    • Conditions
    • Actions
      • Unit - Set life of DamageEventSource to ((Life of DamageEventSource) + (DamageEventAmount x 0.05))
And the Variable DamageEventAmount refers to the total damage after armor and other reductions as well depending on what event or conditions you set, a highly recommended resource.
 
Last edited:
Status
Not open for further replies.
Top