Game Development Community

Level Swapping

by Brown College (#0059) · in Torque Game Builder · 03/24/2008 (7:35 am) · 2 replies

I am in the middle of creating my first interactive piece, and I'm trying to get it so that I can swap between various levels. I have multiple scenes, each one has it's own unique name, and the game is not following conventional genres (i.e. platformers, side scrollers). I need help with this, and considering I know next to nothing on scripting, that doesn't help, either. Any help would be appreciated.

About the author

Recent Threads


#1
03/24/2008 (9:56 am)
"Interactive piece"? "swap levels"? I'm not sure what exactly you are trying to do, but if its as simple as "level 1 is finished, load level 2", you want to do something like:

sceneWindow2D.getSceneGraph().loadLevel( "filename" );

Look at your game/main.cs and gamescripts/game.cs to see how it is loading the "default level" eg. the last level you worked on in the editor.

If you have a player or some objects you want to persist between levels, you can mark them as "persistant".
#2
03/30/2008 (5:37 am)
Part 5 of my tutorial series covers loading various levels/scenes from a central menu area, and each level can be completely unique. Part 5 isn't live yet, but will be in a few days. You can certainly start with Part 1 now, though. I recommend it as a way to get a firm grasp on creating with TGB.

Breakout Tutorial

Greg