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

Questio

Status
Not open for further replies.
Level 10
Joined
Mar 19, 2010
Messages
622
Hey, guys, I think I'd need some assistant again.
My another triggered spell is not work. I'ill post it here so hope someone will be able to help me on it.

This spells is to create Soul at where the hero dies woth the buff "After Life"
So here's the first trigger:
  • AL Init
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) has buff After Life ) Equal to True
    • Actions
      • Set AfterLifePoint = (Position of (Triggering unit))
      • Set AfterLife = (Triggering unit)
      • Trigger - Run AL Trigger <gen> (ignoring conditions)
Heres 2nd's:
  • AL Trigger
    • Events
    • Conditions
    • Actions
      • Unit - Create 1 Soul for (Owner of (Triggering unit)) at AfterLifePoint facing Default building facing degrees
      • Unit - Set level of After Life (Heal) for (Last created unit) to (Level of After Life for (Triggering unit))
      • Unit - Add a (5.00 x (Real((Level of After Life for AfterLife)))) second Generic expiration timer to (Last created unit)
It seems will be worked but I'd have a revive trigger at the same time also, so I think some thing must be changed on the revive trigger. So here's it:
  • Undead Revive
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
      • ((Owner of (Triggering unit)) Equal to Player 5 (Yellow)) or (((Owner of (Triggering unit)) Equal to Player 6 (Orange)) or (((Owner of (Triggering unit)) Equal to Player 7 (Green)) or ((Owner of (Triggering unit)) Equal to Player 8 (Pink))))
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Triggering unit)) Equal to Zar'thkum'maiz
        • Then - Actions
          • Wait (5.00 x (Real((Level of After Life for (Triggering unit))))) seconds
          • Hero - Instantly revive (Triggering unit) at (Center of Undead Revive <gen>), Show revival graphics
        • Else - Actions
          • Hero - Instantly revive (Triggering unit) at (Center of Undead Revive <gen>), Show revival graphics
          • Game - Display to (All allies of (Owner of (Triggering unit))) the text: A fallen ganeral ha...
Hope anyone can solve my problem. I will +rep to those who help me. :D
 
Level 11
Joined
Sep 12, 2008
Messages
657
yeah.. second trigger is basicly runned automaticly,
triggering unit refers to the unit the trigger is using.
a unit dies - triggering unit = dying unit.
a unit enters region - triggering unit = entering unit.
and so on. basicly it has no unit that acts as the trigger used unit.
so it returns null, you cant check level of ability for a nulled unit.
and why not use a timer instead?
 
Level 10
Joined
Mar 19, 2010
Messages
622
Thansk guy, so you mean this?:
  • AL Trigger
    • Events
    • Conditions
    • Actions
      • Unit - Create 1 Soul for (Owner of (AfterLife)) at AfterLifePoint facing Default building facing degrees
      • Unit - Set level of After Life (Heal) for (Last created unit) to (Level of After Life for (AfterLife))
      • Unit - Add a (5.00 x (Real((Level of After Life for AfterLife)))) second Generic expiration timer to (Last created unit)
 
Status
Not open for further replies.
Top