Game Development Community

How to pause the schedule function?

by mohanmartin · in Torque Game Builder · 10/09/2008 (12:52 am) · 2 replies

Hi,

I want to pause the whole process of the game. I can able to pause the t2dsceneWindow. But i'm not able to pause the program that's running.

Assume that we have used the schedule function. And it is going to do a particular job after a certain period of time.

"sceneWindow2D.getSceneGraph().setScenePause(true);"

When i press the pause button, it call the above function, then the animations, particles are paused. But we can't able to pause the schedule function.

#1
11/04/2008 (3:58 pm)
Function pausedGame()
{
$timeScale = !$timeScale; //pauses the game all schedules
}
#2
11/05/2008 (3:52 am)
Thanks for ur answer...

When i press the pause button, it only "stops" (not pause) the schedule functions. my schedule is..

schedule(2500, 0, "fall");

After press the resume button, it doesn't call the schedule function

how can i use this?...