Forum
General
Custom Spawnpoints?
Custom Spawnpoints?
16 replies
1

setpos to set players' positions to a new one. Call the first spawn "spawn1" and let's say a button triggers it and "spawn2".
Make sure "spawn2" gets deactivated first with a start trigger. Now kill yourself and watch the result. You should now always spawn at "spawn2".
Press the button again and kill yourself once more, now you always spawn at "spawn1".
You can also put effects (blinking lights, fire, etc.) with the same names around the spawns to make sure which ones are active.
This of course only makes sense if you're not in the Standard gamemode.
edited 2×, last 12.08.15 12:56:22 am
Talented Doge:
setspawn is better
Anyway i hope he wants the map editor method.
setspawn doesn't even exist. The command is
spawnplayer
spawnplayer does the exactly same job as
setpos, except it has a spawn animation.
Talented Doge: and trigger
spawn hook, so be careful if you use
spawnplayer in
spawn hook
spawnplayer is good when you spawn player that is dead, because even when you will try to spawn player when he's alive, his weapons will disapper
. So
setpos is better.
The Gajos, Nothing hinders you from checking whether the player is alive and then using either
setpos or
spawnplayerIMHO, the best and bullet-proof and hopefully fully bug-free (waow, so many pretty adjectives here) solution is to set the respawn time to n+1 and spawn the player manually at 1 second remaining.
+ no bugs, because we're not using setpos (what happens if the player spawns in between enemy turrets? Dunno. Think of hypothetical scripts using a player's spawnpoint position, they won't know this player's position was used right after spawn)
- the player is force-spawned, he cannot choose himself when to spawn
https://www.dropbox.com/s/nq8lm1bhqs9pwer/example.map?dl=0
1

Offline