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

Triggersleepaction

Status
Not open for further replies.
Level 6
Joined
Aug 12, 2010
Messages
230
for example i have a trigger
event - unit cast a spell
condition - spell equal to chain lightning
action
trigger sleep 5secs
summon 2 lightning spark units on caster's location

will it get retriggered while the trigger is asleep?

say, i cast spell at 0 second mark. the trigger will be "awake?" at 5second mark and i get 2 lightning spark units. so if i cast chain lightning again at 2 second mark, will i get 2 lightning spark units at 7 second or not because the trigger is sleeping?

i hope you understand my question
 
Trigger actions are ran on separate threads, so when you perform a wait in one instance, the other ones won't be affected.

So consider your scenario:
0 second mark -> Trigger waits 5 seconds -> 2 lightning sparks created (5 seconds elapsed total)
2 second mark -> Trigger waits 5 seconds -> 2 lightning sparks created (7 seconds elapsed total)

So you will have 2 sparks created at time = 5 seconds and 2 sparks created at time = 7 seconds. (which means 2 seconds after the previous ones were created)
 
Status
Not open for further replies.
Top