• 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] Lifesteal on bash - problem

Status
Not open for further replies.
Level 1
Joined
Aug 9, 2011
Messages
5
Basically i'm trying to do a spell that steals life based on dmg done when a unit is bashed (buff: stunned(pause). After going thru different triggers i got stuck. Can someone tell me whats wrong with the following trigger(s)?


  • Lifestealon
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Level of BashLifesteal for (Attacking unit)) Greater than 0
    • Actions
      • Set Lifesteal_Target = (Attacked unit)
      • Set Lifesteal_Caster = (Attacking unit)
      • Trigger - Add to Lifestealdmg <gen> the event (Unit - Lifesteal_Target Takes damage)
      • Trigger - Turn on Lifestealdmg <gen>
  • Lifestealdmg
    • Events
    • Conditions
      • ((Triggering unit) has buff Stunned (Pause)) Equal to True
      • (Level of BashLifesteal for (Damage source)) Greater than 0
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Lifesteal_Caster Equal to (Damage source)
        • Then - Actions
          • Set Lifesteal_Damage = (Damage taken)
          • Unit - Set life of Lifesteal_Caster to (Lifesteal_Damage + (Life of (Damage source)))
          • Set Lifesteal_Target = No unit
          • Set Lifesteal_Caster = No unit
          • Trigger - Turn off (This trigger)
        • Else - Actions
          • Trigger - Turn off (This trigger)
 
Level 1
Joined
Aug 9, 2011
Messages
5
Well isn't triggering unit = unit taking damage? (event: unit takes damage)
I don't want to use a damage detection system as i'm trying to learn new things do them on my own. Turning the trigger on and off was left there during previous failed attempts. :D Any other suggestions?
 

Chaosy

Tutorial Reviewer
Level 40
Joined
Jun 9, 2011
Messages
13,219
this works if you want life steal while unit is stunned
  • Untitled Trigger 001
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Level of your_ability for (Attacking unit)) Greater than 0
      • ((Attacked unit) has buff Stunned (Pause)) Equal to True
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of your_ability for (Attacking unit)) Equal to 1
        • Then - Actions
          • Unit - Set life of (Attacking unit) to ((Life of (Attacking unit)) + 10.00)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of your_ability for (Attacking unit)) Equal to 2
        • Then - Actions
          • Unit - Set life of (Attacking unit) to ((Life of (Attacking unit)) + 20.00)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of your_ability for (Attacking unit)) Equal to 3
        • Then - Actions
          • Unit - Set life of (Attacking unit) to ((Life of (Attacking unit)) + 30.00)
        • Else - Actions
 
Level 1
Joined
Aug 9, 2011
Messages
5
this works if you want life steal use this just add the level of ability greater than 0.
and modify the ammout of healing.
  • Untitled Trigger 001
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • ((Attacked unit) has buff Stunned (Pause)) Equal to True
    • Actions
      • Unit - Set life of (Attacking unit) to ((Life of (Attacking unit)) + 10.00)

2 problems with this: 1) attacked unit doesn't have buff at the time of the attack
2) exploitable because the trigger starts when the unit is attacked NOT when the target takes damage + it won't calculate healing based on damage done.

I'll remove the turn on/off trigger and see if it helps.
edit*: Didn't work, the attacker doesn't get healed only if i switch targets after each attack. Don't get why that is happening.
 
Level 1
Joined
Aug 9, 2011
Messages
5
Thx a lot, i'll try it.


edit* Problem Solved; added a 0.05 delay after the conditions in the 2nd trigger.
 
Last edited:
Status
Not open for further replies.
Top