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

Healing Trigger

Status
Not open for further replies.
Level 9
Joined
Aug 1, 2008
Messages
453
Im am making a shield ability that absorbs 5 attacks and i was wondering why the healing in this trigger isnt working.. Heres the setup trigger
  • Shadow Shield TURN ON
    • Events
      • Unit - A unit Finishes casting an ability
    • Conditions
      • (Ability being cast) Equal to Shadow Shield (Neutral Hostile)
    • Actions
      • Set Set_Unit = (Casting unit)
      • Set Shadow_Shield_HP[(Player number of (Owner of Set_Unit))] = (Life of (Casting unit))
      • Set Shadow_INT[(Player number of (Owner of Set_Unit))] = 1




  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • ((Attacked unit) has buff Mana Shield 1 ) Equal to True
      • Shadow_INT[(Player number of (Owner of (Triggering unit)))] Greater than or equal to 1
      • Shadow_INT[(Player number of (Owner of (Triggering unit)))] Less than 5
    • Then - Actions
      • Set Shadow_INT[(Player number of (Owner of (Triggering unit)))] = (Shadow_INT[(Player number of (Owner of (Triggering unit)))] + 1)
      • Unit - Set life of (Triggering unit) to Shadow_Shield_HP[(Player number of (Owner of (Triggering unit)))]
    • Else - Actions
      • Set Shadow_INT[(Player number of (Owner of (Triggering unit)))] = 0
      • Unit - Remove Mana Shield 1 buff from (Triggering unit)
 
Level 8
Joined
Aug 3, 2008
Messages
391
Im am making a shield ability that absorbs 5 attacks and i was wondering why the healing in this trigger isnt working.. Heres the setup trigger
  • Shadow Shield TURN ON
    • Events
      • Unit - A unit Finishes casting an ability
    • Conditions
      • (Ability being cast) Equal to Shadow Shield (Neutral Hostile)
    • Actions
      • Set Set_Unit = (Casting unit)
      • Set Shadow_Shield_HP[(Player number of (Owner of Set_Unit))] = (Life of (Casting unit))
      • Set Shadow_INT[(Player number of (Owner of Set_Unit))] = 1




  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • ((Attacked unit) has buff Mana Shield 1 ) Equal to True
      • Shadow_INT[(Player number of (Owner of (Triggering unit)))] Greater than or equal to 1
      • Shadow_INT[(Player number of (Owner of (Triggering unit)))] Less than 5
    • Then - Actions
      • Set Shadow_INT[(Player number of (Owner of (Triggering unit)))] = (Shadow_INT[(Player number of (Owner of (Triggering unit)))] + 1)
      • Unit - Set life of (Triggering unit) to Shadow_Shield_HP[(Player number of (Owner of (Triggering unit)))]
    • Else - Actions
      • Set Shadow_INT[(Player number of (Owner of (Triggering unit)))] = 0
      • Unit - Remove Mana Shield 1 buff from (Triggering unit)

I see a few problems:

With the Shadow_Shield_HP which as far as I can see stores the health of the unit at the time the unit casts the spell. So it won't work. If the unit has 300 health at the time when casting the spell, his health will be returned to 300 health when attacked.

And secondly, in your second trigger, Triggering unit does not refer to the unit being attacked. Attacked unit does. Triggering unit in this case refers to the attacking unit.

Cheers.
 
Status
Not open for further replies.
Top