multiple spawn areas

multiple spawn areas

Re: multiple spawn areas Posted by Liberal.Nyulism on Mon Feb 21st 2005 at 6:40pm
Liberal.Nyulism
67 posts
Posted 2005-02-21 6:40pm
67 posts 227 snarkmarks Registered: Jan 7th 2005 Occupation: exec Location: USA
Is there a way to have mutiple sets of spawns?

For example, 10% of the time, I'd like to have an alternate set of spawn points for the CT's. I just can't see how to enable or disable spawn points.
Re: multiple spawn areas Posted by Rof on Mon Feb 21st 2005 at 7:38pm
Rof
210 posts
Posted 2005-02-21 7:38pm
Rof
member
210 posts 41 snarkmarks Registered: Dec 3rd 2004
I believe, though I haven't actually tested, that info_player_* entites
can take "Enable" and "Disable" inputs. However the .fgd files don't
contain these commands, so you'll have to enter them manually on the
output tab. Also, you'll have to enter a name for the spawnpoint
manually (turn off smartedit).

If you run a map after entering "developer 2" in the console, you'll
see all the entity i/o messages and it'll tell you if there's an
unhandled input.

So make an info_player_counterterrorist

Turn off smartedit, and add a property: targetname ctspawn

Make a func_button or something and add an output:

Output: OnPressed

target: ctspawn

Input: Disable (you'll have to type this in manually, and it'll probably show up red)

Compile that.

Now turn on developer 2, load the map, spawn and try pressing the
button. If it doesn't work, you should see an error printed at the top
of the screen or in the console.

If that seems to work, kill yourself and see if you can respawn at the CT spawnpoint.

You can also try adding another spawnpoint that you can enable with the press of a button, and see if that works also.
Re: multiple spawn areas Posted by French Toast on Mon Feb 21st 2005 at 8:53pm
French Toast
3043 posts
Posted 2005-02-21 8:53pm
3043 posts 304 snarkmarks Registered: Jan 16th 2005 Occupation: Kicking Ass Location: Canada
Or if you say, make more spawn points then players on a team, then you will cycle through the various points, thus a small amount of the time you will end up in said area.
Re: multiple spawn areas Posted by Rof on Tue Feb 22nd 2005 at 4:34am
Rof
210 posts
Posted 2005-02-22 4:34am
Rof
member
210 posts 41 snarkmarks Registered: Dec 3rd 2004
OK, forget what I said above. I tried it and it doesn't work at all.

Instead, have a look at this example:

www.gci-net.com/users/k/knot/misc/spawn.zip

The map has two CT spawn points, one at the bookcase and one at the
painting. When you press the orange button at the far end, it toggles
on and off orange boxes (just func_brushes) over the spawnpoints.

You can kill yourself by jumping into the hazard-striped marked area.
Note that, as a CT, you'll never spawn at whichever spawnpoint has the
orange box on it (because the box blocks the spawnpoint).

So, all you have to do is make it more subtle (just have the blocker
func_brush look like a piece of raised ground that appears over the
spawnpoints), and use some other logic to turn on and off the
func_brushes, and you can have alternate spawn areas.

Of course you can have one box covering a bunch of spawnpoints to enable/disable multiple spawnpoints at a time.
Re: multiple spawn areas Posted by Joe-Bob on Tue Feb 22nd 2005 at 4:48am
Joe-Bob
180 posts
Posted 2005-02-22 4:48am
Joe-Bob
member
180 posts 77 snarkmarks Registered: Dec 3rd 2004
Look at the Team Deathmatch tutorial.

If I wanted to do this with my CT team, for example, I would do
something like that tutorial. However, don't do any
filtering. Also, one of those teleport triggers should start
deactivated.

Whenever I want to switch the spawn point, I would trigger all of the
old teleports to deactivate, and all of the new ones to activate.
Re: multiple spawn areas Posted by Liberal.Nyulism on Tue Feb 22nd 2005 at 5:15am
Liberal.Nyulism
67 posts
Posted 2005-02-22 5:15am
67 posts 227 snarkmarks Registered: Jan 7th 2005 Occupation: exec Location: USA
Wow. Thanks. Two really good ideas.

I'll give them a try. Thanks again.

This board is great. I couldn't have done my map without it.