Game Development Community

Spawn Client

by Diego Castaneda · in Torque 3D Professional · 07/31/2009 (4:44 pm) · 2 replies

Hello everybody, again i'm here asking for help :p, the question is if anybody knows in wich part of the code, the engine place the player of the client in the respective SpawnSphere, because all the players that im joining in my game are appearing one on the top of the others. Thanks

#1
07/31/2009 (5:19 pm)
I think that's handled by script rather than code. Look in game/core/scipts/server/spawn.cs.

I think there's a bit about the simset names (stock it should be "PlayerSpawnPoints" or "PlayerDropPoints") and it'll spawn the player at random spawnspheres under those simsets.
#2
08/02/2009 (12:28 pm)
Just place multiple spawnpoints in the appropriate simset and the code will chose one at random at spawntime.

You may want to add a check to make sure that they spawnpoint is not blocked. That addition was dropped from the "new" methods. I think (maybe) it can still be found in Beta1 (game.cs) if you need an example of how to do a spawnpoint validity check.