• 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] I have failed at remaking my previous posted ability using Dynamic Index technique

Status
Not open for further replies.
Level 3
Joined
Apr 1, 2017
Messages
47
  • Hand of Protection
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Hand Of Protection
    • Actions
      • Set SB_Index = (SB_Index + 1)
      • Set Caster[SB_Index] = (Triggering unit)
      • Set Target[SB_Index] = (Target unit of ability being cast)
      • Set ZLVL[SB_Index] = (Level of Hand Of Protection for Caster[SB_Index])
      • Set Timer[SB_Index] = 0.00
      • Unit - Make Target[SB_Index] Invulnerable
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • SB_Index Equal to 1
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ZLVL[SB_Index] Equal to 1
            • Then - Actions
              • Trigger - Turn on T1 <gen>
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ZLVL[SB_Index] Equal to 2
                • Then - Actions
                  • Trigger - Turn on T2 <gen>
                • Else - Actions
                  • Trigger - Turn on T3 <gen>
            • Else - Actions
        • Else - Actions

  • T1
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • For each (Integer SB_Loop) from 1 to SB_Index, do (Actions)
        • Loop - Actions
          • Set Timer[SB_Loop] = (Timer[SB_Loop] + 1.00)
          • Game - Display to (All players) the text: (String(Timer[SB_Loop]))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Timer[SB_Loop] Greater than or equal to 15.00
            • Then - Actions
              • Unit - Make Target[SB_Index] Vulnerable
              • Set Caster[SB_Loop] = Caster[SB_Index]
              • Set Target[SB_Loop] = Target[SB_Index]
              • Set Timer[SB_Loop] = Timer[SB_Index]
              • Set SB_Index = (SB_Index - 1)
              • Set SB_Loop = (SB_Loop - 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • SB_Index Equal to 0
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                • Else - Actions
            • Else - Actions

  • T1
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • For each (Integer SB_Loop) from 1 to SB_Index, do (Actions)
        • Loop - Actions
          • Set Timer[SB_Loop] = (Timer[SB_Loop] + 1.00)
          • Game - Display to (All players) the text: (String(Timer[SB_Loop]))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Timer[SB_Loop] Greater than or equal to 30.00
            • Then - Actions
              • Unit - Make Target[SB_Index] Vulnerable
              • Set Caster[SB_Loop] = Caster[SB_Index]
              • Set Target[SB_Loop] = Target[SB_Index]
              • Set Timer[SB_Loop] = Timer[SB_Index]
              • Set SB_Index = (SB_Index - 1)
              • Set SB_Loop = (SB_Loop - 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • SB_Index Equal to 0
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                • Else - Actions
            • Else - Actions

  • T1
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • For each (Integer SB_Loop) from 1 to SB_Index, do (Actions)
        • Loop - Actions
          • Set Timer[SB_Loop] = (Timer[SB_Loop] + 1.00)
          • Game - Display to (All players) the text: (String(Timer[SB_Loop]))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Timer[SB_Loop] Greater than or equal to 45.00
            • Then - Actions
              • Unit - Make Target[SB_Index] Vulnerable
              • Set Caster[SB_Loop] = Caster[SB_Index]
              • Set Target[SB_Loop] = Target[SB_Index]
              • Set Timer[SB_Loop] = Timer[SB_Index]
              • Set SB_Index = (SB_Index - 1)
              • Set SB_Loop = (SB_Loop - 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • SB_Index Equal to 0
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                • Else - Actions
            • Else - Actions

T1, T2, T3 are turned off by default.
 
Status
Not open for further replies.
Top