The set_time_step message might be the first thing to consider. Set factor to 0 and this will effectiely freeze everything that uses engine timing - animate functions, timers, delta time etc.
The time step affects (stops) timer functions so it wont fire. You’ll have to restart it manually somehow, perhaps by checking os.clock() or socket.get_time() .
Also you have to control time of the given collection from another one that is not affected by changed time.
E.g. I have a main collection with main script that loads (via collection proxy) a game collection.
[main collection] -> [game collection]
Whenever I want to make slow motion or pause of the game collection, I send a message to main script in main collection to do it. Main script then changes the time step of the game collection.
Main collection goes then in real time and you can set a timer here for whatever time you want. After it ticks, you can set time step of the game collection back to 1.
I send message with a time of delay and to which time step I want to set the game collection, e. G. I want to have a 1 second pause, I sent
{desired_time_step = 0, delay = 1}
If I want a slow motion effect for 2 seconds I sent:
{desired_time_step = 0.5, delay = 2}
Otherwise, if you will set a time step of collection from which you want to start a timer to 0 - this timer will never count down, because you have no time step here!