Pause all timers?
Shadecerule
18 Feb 2019, 11:23Is there a way to pause all running timers, and then later unpause them?
hegemonkhan
18 Feb 2019, 16:42for Turnscripts, there's:
http://docs.textadventures.co.uk/quest/functions/allturnscripts.html
foreach (turnscript, AllTurnScripts()) {
turnscript.enabled = false // to "pause" (disable) all turnscripts
}
-----------
foreach (turnscript, AllTurnScripts()) {
turnscript.enabled = true // to "un-pause" (enable) all turnscripts
}
not sure if you can do the same with Timers (they might be Functions and not OBJECTS)
maybe you could do something like this:
create ("timer_object")
timer_object.timer_list = NewStringList ()
// add in all the names of your timers:
list add (timer_object.timer_list, TIMER1)
list add (timer_object.timer_list, TIMER2)
list add (timer_object.timer_list, TIMER3)
// etc etc etc
----------------
foreach (timer, timer_object.timer_list) {
DisableTimer (timer)
}
-----------
foreach (timer, timer_object.timer_list) {
EnableTimer (timer)
}