Page 1 of 1
Loading a new level?
Posted: Wed May 26, 2004 11:01 am
by Dark_Exodus
Hi
How I do I load a new map? e.g. the player has completed the first level and now wants to move onto the second one.
At the moment when I try loading the second map the game crashes. I'm using a switch statement to state we're now entering the second level.
any help?
Posted: Wed May 26, 2004 11:08 am
by Tyn
This function deletes all the scene nodes in the scene.
I recommend you incorporate this into your own function so that any other information ( timers, counters, arrays containing pointers to scene nodes ) is saved if necessary and cleared before removing all the scene nodes.
This is what I am planning to put in my code to clear the whole interface:
Code: Select all
bool isLevelCleared = level[currentLevel]->clearLevel();
if ( isLevelCleared == true )
requestGameState(NextLevel);
else
// Display level clearance error
Posted: Wed May 26, 2004 11:27 am
by Dark_Exodus
i'll give that a shot and see what happens.
Posted: Wed May 26, 2004 2:56 pm
by Dark_Exodus
Ok, using clear, clears the screen but the game still crashes
.
I get a runtime error this time (pure virtual function call), which I'm guessing refers to the clear function.
Any ideas?
Posted: Wed May 26, 2004 8:16 pm
by Electron
I'm planning to just drop the device and recreate