Game Development Community

Need to make new level happen

by Draken Knight · in Torque Game Builder · 02/19/2011 (11:35 pm) · 1 replies

Hi I need to make a new scene happen in my game, I making a game that blends Pong, Bricks, and air hockey. When the last brick is destroyed I want to make it so that it goes to the next scene.

here is the code I got so far,


public void LevelCompleted()
{
SceneLoader.Load(@"data\levels\level_02.txscene");



}


#1
02/20/2011 (6:08 am)
If your game window is named "gameWindow" in the GUI files, and %level contains the filename of your level, do this:

gameWindow.loadLevel(%level);

or this, with a delay (when playing transitions/loading animations in a window in front, for example):
gameWindow.schedule(2000, "loadLevel", %level);