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

Life Steal with triggers

Status
Not open for further replies.
Level 27
Joined
Dec 3, 2018
Messages
896
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 25
Joined
Feb 9, 2009
Messages
1,800
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