Creating a Forward Spawn based on a Captured Point

  • If you're asking a question make sure to set the thread type to be a question!

hpkomic

L1: Registered
Jun 30, 2009
38
3
Hello, I've been working on a map called CP labs, and I've made a lot of progress so far, I had a little trouble with creating capture points, but seeing how A Boojum Snark's entities vmf worked, I solved my own problem.

The problem I am having now is the creation of a forward spawn. I want blu to be able to get a new spawn location when they capture point B which will help them push for C. The map is a single stage, with three capture points. There would be three total spawn rooms, red, blu, and blu's forward spawn.

I tried to create a second spawn room for blu, set it to start disabled and set the corresponding player spawns for that room to the associated control point, which was B. When I tried it, Red would spawn there. My assumption is that the associated control point trumps the respawn color. As it is an attack/defend map, Red has control of point B at the start.

So, what I want is a respawn room that red can never use, but when blu takes point B, blu gets to use it.

Is there any way to accomplish this?
 

(-TN-) Ben2

L4: Comfortable Member
Apr 10, 2009
172
15
the reason red was able to use it was probably because the info_playerteamspawns in the spawn have been set to team red or both, double check, if its set to blu, then red will never spawn in there.
 

hpkomic

L1: Registered
Jun 30, 2009
38
3
Just double checked everything. Still no luck.

Red's spawn room consists of a func_respawnroom and one info_player_teamspawn
The settings are as follows:

func_respawnroom:
name- respawn_red
team- red
start disabled- no

info_player_teamspawn:
name- red_spawn_1
team- red
red spawn for round- respawn_red

Blu's initial spawn room functions, here are the settings for it, it has a similar setup to red:

func_respawnroom:
name- respawn_blu_a
team- blu
start disabled- no

info_player_teamspawn:
name- blu_spawn_a_1
team- blu
blu spawn for round- respawn_blu_a

Lastly, here are the settings to the forward spawn, that becomes active when B is capped by blu.

func_respawnroom:
name- respawn_blu_b
team- blu
start disabled- no

info_player_teamspawn:
name- blu_spawn_b_1
team- blu
start disabled- Yes
associated control point- cp_B
red spawn for round- respawn_blu_a

Hopefully that is enough information. Can anyone see where my problem is?
 

Waif

L7: Fancy Member
Mar 22, 2009
412
125
Just double checked everything. Still no luck.

Red's spawn room consists of a func_respawnroom and one info_player_teamspawn
The settings are as follows:

func_respawnroom:
name- respawn_red
team- red
start disabled- no

info_player_teamspawn:
name- red_spawn_1
team- red
red spawn for round- respawn_red

Blu's initial spawn room functions, here are the settings for it, it has a similar setup to red:

func_respawnroom:
name- respawn_blu_a
team- blu
start disabled- no

info_player_teamspawn:
name- blu_spawn_a_1
team- blu
blu spawn for round- respawn_blu_a

Lastly, here are the settings to the forward spawn, that becomes active when B is capped by blu.

func_respawnroom:
name- respawn_blu_b
team- blu
start disabled- no

info_player_teamspawn:
name- blu_spawn_b_1
team- blu
start disabled- Yes
associated control point- cp_B
red spawn for round- respawn_blu_a

Hopefully that is enough information. Can anyone see where my problem is?

The bolded bit down the bottom looks a bit dodgey,

Firstly I think you meant 'Blue spawn for round', not red.

Also with that option you should get rid of the 'respawn_blu_a' entry.

That should fix it.

Everything else looks alright, all you need to do is after the point is capped, send an output to blues first spawn point entity, disabling it and at the same time enabling the forward spawn enitinty.
You don't have to worrie about disabling/ enabling func_respawn_rooms, leave them enabled at all times- just disable/ enable the actual spawns.

Hope that made sense :)
 

hpkomic

L1: Registered
Jun 30, 2009
38
3
Alright, progress. Now red is spawning in the correct place. Though, upon capturing B, blu still does not get the forward spawn. I made the changes that Mashpotatoe suggested concerning the output on point B. So, what do I try next?

Thanks for the help guys, I really appreciate it.
 

Open Blade

L420: High Member
Nov 30, 2007
439
34
Make sure you set the info_player_teamspawn at the original blu spawn room to associate with the first control point. It doesn't look like you have that set up. If you don't do that, blu will keep spawning from there no matter what points are capped by them.
 
Last edited:

hpkomic

L1: Registered
Jun 30, 2009
38
3
Just associated the first blu spawn to cap A, however now red is spawning in that location as well. :(

Maybe I should just remove all the spawns and try again from the start? Can anyone suggest what I need for each spawn to make them work?
 

Open Blade

L420: High Member
Nov 30, 2007
439
34
Just associated the first blu spawn to cap A, however now red is spawning in that location as well. :(

Maybe I should just remove all the spawns and try again from the start? Can anyone suggest what I need for each spawn to make them work?

If both Red and Blu are both spawning there then you probably have one of your info_player_teamspawns set up wrong. This is not uncommon. People will copy and past those in there and then not realize they have one of them set to either Red or Blu and and the rest set up correctly based on who SHOULD spawn there. Did you double check that? Just delete all of them except one in each room. Make sure they are set up right, then copy and past more per room from the first one in each room. It should not be hard. It's pretty simple to get forward spawns working. You can double check other maps that have this set up also, just to see what you might be missing. Also double check your triggers, just to make sure.


Ahh, another thing it could be, depending how you have your capture points set up, make sure each team has to cap a certain point before another point can be captured, on final points, set a team to win, on the middle capture points, set that to no. On the final points on each side, presuming it's not an attack defend map, make sure you have the previous point required the same as that point. So cap A previous point will be Cap A. If it's attack, defend, you won't use that set up.
 

hpkomic

L1: Registered
Jun 30, 2009
38
3
Okay, red is now spawning in the correct location. Blu, however, will not spawn in the new room after B is capped. I have an output on the b trigger to disable the first blu spawn, and enable the second. Surely I am missing something.

Is there a tutorial anywhere about building forward spawns based on captured points?
 

Open Blade

L420: High Member
Nov 30, 2007
439
34
Okay, this was driving me crazy so I had to figure this out. I know what your problem is now. Do NOT set the forward info_player_teamspawn set to start disabled. You want that set to No. Since you don't have any rounds in your map, leave those fields blank.

This is how your forward spawn should look like (the info_player_teamspawn).

Name: whatever you want
Team: Blu
Start Disabled: No
Associated Control Point: whatever you want
Blu Spawn for Round: blank
Red Spawn for Round: blank


Just make sure you set your door trigger on your forward spawn to have an input from the capture point to activate the door trigger if you want to keep players from being able to go into the room if the associated point has not been capped. Some like to keep it where you can go in there to get resupply and some don't allow you to go in there at all until your team captures a certain point.

That should do it for you.
 

hpkomic

L1: Registered
Jun 30, 2009
38
3
You're going to hate me for this. I changed the spawn entity for the forward spawn to your suggested settings and blu will still not spawn in the room after Cap B has been taken.

I appreciate the help, obviously, this is fairly maddening.
 

Open Blade

L420: High Member
Nov 30, 2007
439
34
You're going to hate me for this. I changed the spawn entity for the forward spawn to your suggested settings and blu will still not spawn in the room after Cap B has been taken.

I appreciate the help, obviously, this is fairly maddening.

Can you send me the vmf and let me take a look at it? Also, tell me where you have all of your main map entities such as team filters, control point master, etc..., so I don't have to go around looking for them.
azhelton@cox.net
 
Last edited:

Open Blade

L420: High Member
Nov 30, 2007
439
34
Okay, I am posting the problems I found on your map here so that others might be able to learn from the problems also.

Go ahead and make these changes and compile your map again. It should work.

Your Blu info_player_teamspawn named (blu_spawn_a_1) had a setting in the blue spawn for round field (that needs to be blank since you have no rounds in your map)

Your Blu info_player_teamspawn named (blu_spawn_a_1) is associated with a trigger capture area with no name (you need to give it a name) and it happens to be control point B. That needs to be control Point A. Your forward spawn will be associated with control point B.

Trigger Capture Area for control Point A does not have a name. It needs a name. Also, if Red cannot capture it, why do you have a setting in the field (number of red players to cap)? Leave that blank if Red cannot capture that point.

The team control point entity named cp_A has a setting at the bottom called BLUE Previous Required Point 1 and you have in the field (cp_1A) and it's red text. That means that entity does not exist. It should be the same (cp_A).

You do not need to disable info_player_teamspawn named (blu_spawn_a_1) on any of your team control points. The info_player_teamspawn will know when to allow spawning when that team captures the associated control point. Go to the outputs tab and remove that. Also remove the enable value also. You don't need that. All of the forward spawning is controlled via the information in the info_player_teamspawn entities.


Trigger Capture Area for capture point C does not have a name. It needs a name. Also, if Red cannot capture, remove the entry in the field (number of red players to cap), that should be left blank.

You do not need the entity called team_control_point_round since you do not have any rounds on your map. It's pretty much a basic 3 control point map set up as attack/defend. There are no rounds. Get rid of that entity.

You have no cap layout on your team_control_point_master. You will not have your caps show on the hud if you leave that blank. Nobody will know what capture points have been capture other then the audio sounds at the time of capture. Read the instructions in the field and will tell you how to input your layout.

I did not see any team filter for red. You need to add one if you have not.

Replace the skybox texture tools/skybox2d with tools/toolsskybox

Also, it's just a personal choice on this but I like to have my func_respawnroom_visualizer brush behind the gate prop. I belive it you have it in front, the red circle will appear it floating in front of the prop, not behind it. Just click on the brackets key to allow you to use smaller units and then resize that brush to go behind the gate model but still seal to your wall so nobody can sqeeze through inside to the spawn room.
 
Last edited:

hpkomic

L1: Registered
Jun 30, 2009
38
3
Made the changes as you specified. Except now red automatically wins the map during the setup. So I have no real way of telling if blu's second spawn will work.

Sigh.

I fail at Hammer. Is everyone's first map this much trouble, or am I a special case?
 

Open Blade

L420: High Member
Nov 30, 2007
439
34
Made the changes as you specified. Except now red automatically wins the map during the setup. So I have no real way of telling if blu's second spawn will work.

Sigh.

I fail at Hammer. Is everyone's first map this much trouble, or am I a special case?

You're not a special case, first maps there is always a steep learning curve. It gets easier but you still have tons more to learn. We all had to start where you are.

Take a look at Gravelpit. It has the same setup as your map. Go through the entities and see if you can find out what the problem is. Use your reasoning skills. Why would Red win during setup? What entities control the setup? You control points and spawn rooms/players should be fine if you did what I told you so the key is, check the other map entities you have and see if you can find what the problem is. We all have had help from others on forums but you will also have to learn how to go into stock valve maps to find some answers on your own soon enough. Those maps serve as a great resource to learn many many things.

Also check the valve site for information - http://developer.valvesoftware.com/wiki/Team_Fortress_2_Level_Creation

I looked at gravelpit and on it's control_point_master it is set so Red team cannot win. On yours it's set to neither. Try changing that and see if it works. Moving forward, I would look to gravelpit to help with some of your questions. It's set up the same way your map is.
 
Last edited:

hpkomic

L1: Registered
Jun 30, 2009
38
3
Finally got it working, the points work, the round works, and the forward spawn functions! Now it's time to get all my doors and start tightening up the map for a play-release.

Thanks again Open Blade.
 

Open Blade

L420: High Member
Nov 30, 2007
439
34
Finally got it working, the points work, the round works, and the forward spawn functions! Now it's time to get all my doors and start tightening up the map for a play-release.

Thanks again Open Blade.

No problem. I've had alot of cool people here help me out so I try to pay it forward when I can. Feels good to get stuff fixed.