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

Status
Not open for further replies.
Level 2
Joined
Nov 28, 2015
Messages
8
Hi again, people. Can you help me out on how to make a "wait timer" in loop trigger? I mean for example, you are going to make a spell which has a charging peroid of time to give it a virtual massive blast?
 
Last edited by a moderator:
Level 24
Joined
Aug 1, 2013
Messages
4,658
Hi again, people.
Can you help me out on how to make a "wait timer" in loop trigger?
I mean for example, you are going to make a spell which has a charging peroid of time to give it a virtual massive blast?

All help appreciated.

Fixed it for you.
You can use waits in loops... if you want timers, you can go for either dynamic indexing or learn JASS :D
 
Level 13
Joined
Jan 2, 2016
Messages
978
You can use wait(s) in loops, if you are using a unique variable for the loop (not IntegerA/B), that isn't used in any other triggers.
You can NOT use wait's only in "pick all units in group and do actions". This is another kind of loop tho.
If you want to use wait in the 2-nd kind of loop - you could do something like this:
loop:
do some actions
set Temp_Unit = Picked Unit
run trigger 2 (checking conditions)

trigger 2:
local unit u = udg_Temp_Unit (this is done via custom script)
wait (the amount you want)
set udg_Temp_Unit = u (this is also done via custom script)
do the rest of the actions you want.

(This is one of the ways to do in in GUI, but doing it in JASS is easier)
 
Status
Not open for further replies.
Top