Game Development Community

Unloading/Loading new missions (levels)

by George Tagmire · in Technical Issues · 12/05/2009 (4:13 pm) · 0 replies

I have been working with TGEA 1.8 for the past fews months now and I am still having trouble with swapping out missions. We have it set up currently through triggers. When the player reaches the end of the level, the trigger is called to load the next mission after playing a cutscene. The cutscene plays, and after it is done or the mouse is clicked the next level begins to load. Occasionally the next level loads just fine and everything is perfect, but more often Torque freezes while loading the mission and does not respond.

This is of course a major problem. We have 7 levels to our game. Id say you could probably make it completely through about 5% of the time, while 95% of the time it crashes upon loading one of the levels. Every level loads perfectly fine if loaded first as the default mission. A level also loads fine if reloaded. Ive tried rehashing the Stronghold level select but it also gives me the same results. Another side note is that while opening mission files through the editor, we sometimes also encounter the crashing.

So onto my question. If I cannot successfully load each level one after another, is there a way to completely almost "end the game" and make TGEA think you are starting fresh, but while changing the default mission to the next level? Ive tried endGame(), disconnect(), destroyServer(), etc. We are in desperate need of help, so any is appreciated! Thank you.

Extra Notes:
-Single Player game
-No real error codes in console
-Tried everything I could think of =)