Starting a new mission?
by Dreamer · in Torque Game Engine · 11/09/2005 (11:00 pm) · 0 replies
Man I really should know this answer by now, but alas it seems I have forgotten.
I'm almost embarrased to ask, but since I'm having some difficulties, I guess I should.
How on earth do I tell the engine, that this mission is over and it's time to load a new one without waiting for the timer to expire?
I've tried onCycleExec but that just sent the engine into an infinite loop.
And cycleGame() caused it to hard freeze the game and doing a trace shows nothing, just looks like the game ended.
*update*
Woohoo! I got it right the first time, it is cycleGame, the only thing I didn't notice was I had added some cleanup code that wasn't needed so of course, it hard froze while trying to delete an object that no longer existed.
Moral of the story? don't .delete() without an isObject first!
I'm almost embarrased to ask, but since I'm having some difficulties, I guess I should.
How on earth do I tell the engine, that this mission is over and it's time to load a new one without waiting for the timer to expire?
I've tried onCycleExec but that just sent the engine into an infinite loop.
And cycleGame() caused it to hard freeze the game and doing a trace shows nothing, just looks like the game ended.
*update*
Woohoo! I got it right the first time, it is cycleGame, the only thing I didn't notice was I had added some cleanup code that wasn't needed so of course, it hard froze while trying to delete an object that no longer existed.
Moral of the story? don't .delete() without an isObject first!