Game Development Community

Trigger respawn

by Joshua david groves · in Torque 3D Beginner · 01/19/2014 (12:28 pm) · 4 replies

Need help With a Trigger respawn When you fall off the edge

#1
01/22/2014 (6:41 am)
Make a large trigger that spans your entire traversible level area and is below the play area. In the onEnterTrigger() method check if %obj (third parameter) is a player - if so, call %obj.kill(). Player dies, and respawns at the start (or a random spawn point, or however you have your respawning set up).
#2
01/25/2014 (12:02 am)
Instead of a large trigger you can also use the "Mission Area".

An example with the "kill" function could be:

function PlayerData::onLeaveMissionArea(%this, %obj)
{
   echo("Someone or something left the MissionArea");
   %obj.kill();
}
#3
01/25/2014 (6:49 am)
Nice, Nils! And with triggers acting wonky using the mission area is probably a better idea.
#4
01/25/2014 (8:10 am)
Quote:And with triggers acting wonky using the mission area is probably a better idea

Those wonky bitches drive me up to the wall Richard, as AI doesn't spawn on command (onEnterTrigger) and leave the missions desolated. Did you find something suspicious already?