Loop an effect, not working (is there a better way.)

TideOfChaos

New Member
Reaction score
25
I have a Trigger that I need to lopp an effect a certain amount of times (5*the level of an ability)

So, I made this:
Trigger:
  • Burning Barrage
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Burning Barrage
    • Actions
      • Set TempUnit3 = (Casting unit)
      • -------- ------------ --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • TempInt Not equal to ((Level of Burning Barrage for TempUnit3) x 5)
        • Then - Actions
          • Unit - Create 1 Burning Barrage Dummy for (Owner of TempUnit3) at (Position of TempUnit3) facing (Facing of TempUnit3) degrees
          • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
          • Set TempUnit1 = (Last created unit)
          • Unit - Create 1 Burning Barrage Dummy for Neutral Hostile at ((Position of TempUnit3) offset by (Random real number between 0.00 and 600.00) towards (Random angle) degrees) facing (Facing of TempUnit3) degrees
          • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
          • Set TempUnit2 = (Last created unit)
          • Unit - Order TempUnit1 to Neutral Alchemist - Acid Bomb TempUnit2
          • Set TempInt = (TempInt + 1)
          • Trigger - Run (This trigger) (ignoring conditions)
        • Else - Actions
          • Set TempInt = 0


The dummies are created only once, and the acid bomb isn't cast. Help please.

(Not sure about the tags)
 

RaiJin

New Member
Reaction score
40
Trigger:
  • Burning Barrage
    • Events
    • Unit - A unit Begins casting an ability
    • Conditions
    • (Ability being cast) Equal to Burning Barrage
    • Actions
    • Set TempUnit3 = (Casting unit)
    • -------- ------------ --------
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
    • TempInt Not equal to ((Level of Burning Barrage for TempUnit3) x 5)
    • Then - Actions
    • Unit - Create 1 Burning Barrage Dummy for (Owner of TempUnit3) at (Position of TempUnit3) facing (Facing of TempUnit3) degrees
    • Set TempUnit1 = (Last created unit)
    • Unit - Create 1 Burning Barrage Dummy for Neutral Hostile at ((Position of TempUnit3) offset by (Random real number between 0.00 and 600.00) towards (Random angle) degrees) facing (Facing of TempUnit3) degrees
    • Set TempUnit2 = (Last created unit)
    • Unit - Order TempUnit1 to Neutral Alchemist - Acid Bomb TempUnit2
    • Unit - Remove TempUnit1 from the game
    • Unit - Remove TempUnit2 from the game
    • Set TempInt = (TempInt + 1)
    • Trigger - Run (This trigger) (ignoring conditions)
    • Else - Actions
    • Set TempInt = 0


kk imma lookat it now xD

edit : nononono ur doing the loop all wrong.. use the function For Each Integer A from 1 - 6 or w/e that is caleld
 

tuantai120

Cool Member
Reaction score
1
Trigger:
  • For each (Integer A) from 1 to ((Level of Shockwave for (Casting unit)) x 5), do (Actions)
    • Loop - Actions
    • // do what do you want
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top