Game Development Community

Random multiplayer spawning + kill switch

by Jonas · in Torque 3D Professional · 08/10/2010 (6:30 pm) · 2 replies

Hi community! today i have 2 questions of the following:

Random multiplayer spawns:

Basically i want to have 10-14 spawns that the player can be randomly spawned in at the beginning/ on death
in a multiplayer map i have made. (No different then the current spawn systems used in death match)

Preferable check if someone spawned on that point for the last 5 seconds if so it will jump to the next one.

Kill switch:

Having a button that kills the current character your controlling and being ready for re spawn.

if anyone could just drop a quick solution that would be great :-)

About the author

Freelance 3D artist at day scripter/coder on Enduring Life at night. Lover of all things TorqueScript.


#1
08/10/2010 (7:30 pm)
Random spawning: stock behavior already accounts for this, just use multiple spawnpoints in the mission.

Time limit check for spawnpoints: You'd have to modify the pickSpawnPoint method to check a dynamic property to see if the chosen spawnpoint has been used recently. If not then set the property to true and move on to spawning. If it is already true then simply skip over that spawnpoint and find another. To reset the property use a schedule timed for however long you want to disable that spawnpoint.

kill switch: CTRL+K
#2
08/10/2010 (7:58 pm)
I am embarrassed really what can i say, i screwed up i should have given it a couple of hours and really looked a bit harder.

Thanks for your answers Michael appreciated !