unload / load next level
by Matthew Taaffe · in Torque X Platformer Kit · 01/27/2010 (8:35 am) · 3 replies
Hi, im new to torque x and someone else i know does mostly the code not me, but they are away so ive been trying to do it.
Ive been using the PlatformerDemo template when you start the project and i made some nice levels but i have searched on the internet to see how i can load the next level. I have the gameover and congrats animation come up if i collect the gold egg or die so that works fine.
Here is where is loads the level:
protected override void BeginRun()
{
base.BeginRun();
// load the test level
SceneLoader.Load(@"datalevelstest_level_01.txscene");
But in the "levelCompleted" i read somewhere to unload the 1st level then load in the next but what happenes is, either it crashes when i get the gold egg and the congrats animation comes in but i cant move or it loads the same level but the camera does not move and the congrats animation stays on the screen.
public void LevelCompleted()
{
SceneLoader.Unload(@"datalevelstest_level_01.txscene");
SceneLoader.Load(@"datalevelslevel_01.txscene");
if (_gameIsOver)
return;
Where am i going wrong? Please help.
Ive been using the PlatformerDemo template when you start the project and i made some nice levels but i have searched on the internet to see how i can load the next level. I have the gameover and congrats animation come up if i collect the gold egg or die so that works fine.
Here is where is loads the level:
protected override void BeginRun()
{
base.BeginRun();
// load the test level
SceneLoader.Load(@"datalevelstest_level_01.txscene");
But in the "levelCompleted" i read somewhere to unload the 1st level then load in the next but what happenes is, either it crashes when i get the gold egg and the congrats animation comes in but i cant move or it loads the same level but the camera does not move and the congrats animation stays on the screen.
public void LevelCompleted()
{
SceneLoader.Unload(@"datalevelstest_level_01.txscene");
SceneLoader.Load(@"datalevelslevel_01.txscene");
if (_gameIsOver)
return;
Where am i going wrong? Please help.
About the author
#2
07/03/2010 (11:57 pm)
*bump* I'm having the same problem (I'm still new to TorqueX too). Did anyone find a sure-fire way to work with it?
#3
http://www.torquepowered.com/community/forums/viewthread/85251
It's only a few threads lower...
07/04/2010 (7:31 am)
Look at this thread, especially my posts.http://www.torquepowered.com/community/forums/viewthread/85251
It's only a few threads lower...
Torque Owner Darrell
I was told twice that the way to fix it is to load a splash screen in between level transitions.. But I have no idea how to do that..
If you find out the answer please let me know.. Ill do the same if I ever get a step by step answer