1. Head to the 33rd Modeling Contest Poll and drink to your heart's desire.
    Dismiss Notice
  2. Choose your means of doom in the 17th Mini Mapping Contest Poll.
    Dismiss Notice
  3. A slave to two rhythms, the 22nd Terraining Contest is here.
    Dismiss Notice
  4. The heavens smile on the old faithful. The 16th Techtree Contest has begun.
    Dismiss Notice
  5. The die is cast - the 6th Melee Mapping Contest results have been announced. Onward to the Hive Cup!
    Dismiss Notice
  6. The glory of the 20th Icon Contest is yours for the taking!
    Dismiss Notice
  7. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Questio

Discussion in 'Triggers & Scripts' started by yeohxin, Oct 16, 2010.

  1. yeohxin

    yeohxin

    Joined:
    Mar 19, 2010
    Messages:
    616
    Resources:
    2
    Maps:
    1
    Spells:
    1
    Resources:
    2
    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
     
  2. tjordell

    tjordell

    Joined:
    Jan 25, 2009
    Messages:
    554
    Resources:
    5
    Icons:
    1
    Spells:
    4
    Resources:
    5
    EDIT: You should use the stored variable "AfterLife" in the second trigger to create the Soul. Replace all (Triggering Unit) to (AfterLife) in the second trigger.
     
  3. dardas

    dardas

    Joined:
    Sep 12, 2008
    Messages:
    649
    Resources:
    0
    Resources:
    0
    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?
     
  4. yeohxin

    yeohxin

    Joined:
    Mar 19, 2010
    Messages:
    616
    Resources:
    2
    Maps:
    1
    Spells:
    1
    Resources:
    2
    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)