Game Development Community

How do I pause the game without stopping scheduled events?

by Jereis Zaatri · in Torque Game Engine · 07/26/2010 (5:36 pm) · 5 replies

Hello,

Does anyone know how to stop things like the physics,speed,velocity and other events in the scene without stopping the animations created on the GUI level?

#1
08/01/2010 (10:33 am)
You could try setting $timescale = 0; -- I don't recall if it effects the gui or not...
#2
08/01/2010 (10:51 am)
Nope, I use "schedule" for my GUI animations, and timescale effects that call.
#3
08/06/2010 (2:09 am)
Yes, $timescale=0 effects schedules and also seems to effect serverCmds

Only thing I can imagine is to pause the '3d simulation' separate from the rest of the timing system. There are a couple ways of doing it, you might make a specific change to ShapeBase to stop processing once a boolean value has changed or force call objects velocity to 0 - both are quite hacky but should work.
#4
08/06/2010 (4:24 pm)
Little more information.

Add a static bool to a class, place the bool in processTick, interpolateTick, packUpdate and unpackUpdate
#5
09/09/2010 (2:02 pm)
Hmm kinda interesting did not actually know there was a global like $timescale What other useful globals are there? I have a couple books on the engine but none of them list anything about script globals much less c++ side ones. Is there a documented list of them somewhere?