I have never tried before, but is it possible to have the same timer running in different instances, perhaps by using a local variable? I would like to stay away from Galaxy Script, so if this is possible with the trigger GUI, that is what I am looking for. Otherwise I am going to have to use a rather messy workaround that I would rather avoid.
In other words, I would like a trigger to start a timer. I want that same timer to be able to be run in a separate instance. Could I just make the timer local, and then have a trigger that can detect when each instance of the timer has completed?
Any specific reason, why you want to use a timer? You could just use a custom action involving a wait, and check the setting, which makes it use its own thread.
Lag and because wait conditions are considered bad coding while inside of loops.
Well, this was in WC3. For SC2 waits are just as precise as a timer, timers are probably worse for performance, because they require an additional object and a trigger reacting to them. So in general, I would use waits over timers in most cases for SC2, except you have very specific reasons to use a timer (aka you need the timer window).
Huh, very interesting. Guess I'm just used to Java, where using a wait stops the thread until it is finished. Very interesting, thank you.
This is the same for SC2, and actually there is no sane way to avoid this. Like stated, you can use custom actions, which you can flag to run in their own threads. Or you can use timers. Both of them need a trigger (the run in own thread flag translates to creating and running a trigger in galaxy), timers need the timer object. So waits are probably the lesser evil in this case.
I have never tried before, but is it possible to have the same timer running in different instances, perhaps by using a local variable? I would like to stay away from Galaxy Script, so if this is possible with the trigger GUI, that is what I am looking for. Otherwise I am going to have to use a rather messy workaround that I would rather avoid.
In other words, I would like a trigger to start a timer. I want that same timer to be able to be run in a separate instance. Could I just make the timer local, and then have a trigger that can detect when each instance of the timer has completed?
Great to be back and part of the community again!
Any specific reason, why you want to use a timer? You could just use a custom action involving a wait, and check the setting, which makes it use its own thread.
@Kueken531: Go
Lag and because wait conditions are considered bad coding while inside of loops.
Great to be back and part of the community again!
Well, this was in WC3. For SC2 waits are just as precise as a timer, timers are probably worse for performance, because they require an additional object and a trigger reacting to them. So in general, I would use waits over timers in most cases for SC2, except you have very specific reasons to use a timer (aka you need the timer window).
@Kueken531: Go
Huh, very interesting. Guess I'm just used to Java, where using a wait stops the thread until it is finished. Very interesting, thank you.
Great to be back and part of the community again!
This is the same for SC2, and actually there is no sane way to avoid this. Like stated, you can use custom actions, which you can flag to run in their own threads. Or you can use timers. Both of them need a trigger (the run in own thread flag translates to creating and running a trigger in galaxy), timers need the timer object. So waits are probably the lesser evil in this case.