Wait time problem with trigger.

romanandre

New Member
Reaction score
2
Why doesn't it loop if I put the wait time in this trigger? I want the trigger to cause damage every 0.5 seconds and loop 4 times.

Trigger:
  • Jaina Spell 1
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Jaina Spell 1
    • Actions
      • Unit Group - Pick every unit in (Units within 450.00 of (Target point of ability being cast)) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) belongs to an enemy of (Owner of (Casting unit))) Equal to True
              • ((Picked unit) is A structure) Equal to False
            • Then - Actions
              • For each (Integer A) from 1 to 4, do (Actions)
                • Loop - Actions
                  • Unit - Cause (Casting unit) to damage (Picked unit), dealing 10.00 damage of attack type Spells and damage type Normal
                  • Wait 0.50 seconds
            • Else - Actions
              • Do nothing
 

tommerbob

Minecraft. :D
Reaction score
110
Use a periodic event or a timer. Also, use (Triggering unit), not (Casting unit).
 

Dirac

22710180
Reaction score
147
Also, if you add a wait inside a loop that's inside a loop lots of problems will pop up such as:
Every time your group picks an unit it has to wait 2 seconds until it picks the next one. Those 2 seconds come from waiting 0.5 seconds 4 times inside the loop that damages unit. I'm sure that's not what you want
 

kingkwong92

Well-Known Member
Reaction score
25
a periodic event is a timer. Every 0.5 seconds have it do what you want and turn off the trigger after its done. Turn the trigger back on when you cast the ability again.
 
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