Forum

> > CS2D > General > Custom Spawnpoints?
Forums overviewCS2D overviewGeneral overviewLog in to reply

English Custom Spawnpoints?

16 replies
To the start Previous 1 Next To the start

old Custom Spawnpoints?

HoOtix
User Off Offline

Quote
Is it possible to make custom spawnpoints? For example, You spawn at your "basic" spawnpoint. But when you pass a special area/zone/point your "basic" spawn gets de-activated and then a new spawn activates, so after you die you spawn on the 'new' spawnpoint? I'm not sure if this is possible, but... Is it?

old Re: Custom Spawnpoints?

Seekay
Reviewer Off Offline

Quote
If you're talking about mapping, it is possible to de- and reactivate spawnpoints via triggers.

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 02:56:22 am

old Re: Custom Spawnpoints?

VADemon
User Off Offline

Quote
@user The Gajos, Nothing hinders you from checking whether the player is alive and then using either cs2d cmd setpos or cs2d cmd spawnplayer

IMHO, 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

old Re: Custom Spawnpoints?

Seekay
Reviewer Off Offline

Quote
You guys assume he's talking about Lua scripting. He never mentioned that. You don't need Lua to trigger spawnpoints.

old Re: Custom Spawnpoints?

Talented Doge
User Off Offline

Quote
I used to play on co-op maps with different spawn positions, so I think using trigger_move or whatever may work. Trigger_start the unused spawnpoints at start will work.

old Re: Custom Spawnpoints?

gamus
User Off Offline

Quote
Well, yes. Add a Trigger_Start triggering a Trigger_Delay (1 second) triggering unused spawnpoints.

old Re: Custom Spawnpoints?

Seekay
Reviewer Off Offline

Quote
..why would you need a delay? That means in that second before it gets deactivated, someone can spawn there... that's no good.
To the start Previous 1 Next To the start
Log in to replyGeneral overviewCS2D overviewForums overview