Game Development Community

Restart level after death? TGE 1.5.2

by Michael Callaghan · in Torque Developer Network · 06/18/2011 (10:53 pm) · 3 replies

I posted something like this already but got no response so figured I would try explaining it differently. Basically when I die on in my game, it just sits there, doesn't do a thing. I need the game to at least restart the level after the player dies. It has to be an easy line of code to change but I can't figure it out. Any help would be appreciated. Thanks in advance.

#1
06/19/2011 (5:22 am)
Pressing space bar will re-spawn you, or did you want it to re-start from scratch after your player dies?
#2
06/19/2011 (9:29 pm)
Hmmm . . . Space bar doesn't do anything in my game, maybe I did something to mess it up? I basically want the entire level to start over when the player dies. Another classmate sent me his demo and that's what his does, I am trying to get the same effect. Any help would be appreciated, thanks!
#3
06/20/2011 (2:16 am)
If you have changed the keys that are used for jump, or dont have a jump in your game it wont work! The camera after death waits for a movetrigger2 before respawning.

[code]
function DoJumpHuman(%val)
{
$mvTriggerCount2++;
}
[code]

if this code doesnt get called by a key press, nothing will happen.

Hope this helps!