Game Development Community

Pausing on start

by Mike Wyatt · in Torque Game Builder · 12/15/2009 (10:59 pm) · 3 replies

I'm very new to TGB, and I've been going through the official tutorials for the last few days. One thing that has bugged me is that the world simulation appears to start running before rendering begins. In some of the tutorials (like the one regarding world limits), the fast moving crate is out of the camera view before I ever see it.

Is there an easy way to avoid this problem, or maybe just a pause command I can run when the scene starts?

FYI, I've been programming for a while, so I'd be comfortable doing whatever in the scripts.

Thanks.

About the author

Recent Threads


#1
12/15/2009 (11:46 pm)
use the "stop" button
#2
12/16/2009 (12:14 am)
Where is this button, and what does it do?
#3
12/16/2009 (2:29 pm)
zee goggles zey do nothing

at the end of
function startGame(%level) in game.cs

you can probably use
$lastLoadedScene.setScenePause(true);

to pause the game the second it loads

and then you can unPause the scene on mouse down with this, feel free to just throw it into game.cs

function sceneWindow2D::onMouseDown( %this, %modifier, %worldPos, %mouseClicks )
{	
	$lastLoadedScene.setScenePause(false);
}

that way the game will be paused until you click. That should be a quick way to make anything wait until you click.