TF2/Creating a Spawnroom
Creating your room
First of all, you should choose an area in your map for the spawnroom to be located. It must be large enough to contain however many
info_player_teamspawn entities you want to add there without colliding with them. It should also have a hole in the wall for the door that we'll add in later. Other than that it may be of any shape or color. For this example, the room you see on the right will be transformed into a spawnroom for the RED team.
Making it a respawn room
See also: Creating Respawn Areas
Bring the players inside
First create an
info_player_teamspawn in your room, then open its properties box and change the team to RED and the target name to something like team_red_player_01. This naming convention can later help with keeping track of the spawnroom a teampspawn entity is in for debugging and such. Once you are done setting the properties, make 15 additional copies of that info_player_teamspawn entity, making sure each of them have plenty of space. Also, make sure each spawnpoint is raised a small distance off the floor, otherwise they will not work.
Allow players to change class without dying
Now create a
func_respawnroom brush-based entity with material
tools/toolstrigger that fills the area containing the info_player_teamspawn entities, you want it to touch the floor and be at least 96 units high. You can do this by using the block tool and creating a square with the
tools/toolstrigger material, then click
To Entity. Name it something like respawnroom_red_01 (depending on how many spawn rooms you may have for that team) and set its team to RED. Note that this brush will also prevent Engineers from placing their buildings.
Adding a resupply cabinet
See also: Resupply Areas
It may be good to have a resupply area inside your respawn. A resupply consists of two entities:
prop_dynamic somewhere obvious in the room, set its model to
models/props_gameplay/resupply_locker.mdl, and give it a name such as resupply_red_1. You can also tweak how long the open/close animation takes by editing the min/max animation time option. Usually 0.5 is a good value to use. Now create a
func_regenerate brush-based entity with material
tools/toolstrigger, making sure it occupies a larger area surrounding the prop. Set its
Associated Model to the name given to the
prop_dynamic (in this article, resupply_red_1), and set its team to RED.
Keeping the bullies out
See also: Team-Specific Barriers
Some players like to camp in spawn rooms, killing players right after they spawn. There is, however, an easy solution to this problem which consists of creating a barrier that blocks off the spawnroom entrance from players on the opposing team.
To do this, create a
func_respawnroomvisualizer brush-based entity with material
tools/toolsnodraw. Assign the material
overlays/no_entry to the side that faces away from the spawn area and be sure to set its
Associated Respawn Room to the correct func_respawnroom, for example, respawnroom_red_01.
Making a door
See also: Team-Specific Doors
The final step is to make a door that will seal off (non-vis) the room from most weapons fire. Firstly, place a
prop_dynamic in the doorway and set its model to
Next, create a
func_door entity. You should try to shape and size the brush close to the size of the prop door. Name it to something that goes along with the current naming scheme (depending on the number of rooms you are going to make), for example, door_spawnroom_red_01. As this entity will be an unseen physical representation for the prop, texture it with a material that matches the model used for the door, in this case we'll use
func_door attributes you will have to change individually:
- Render Mode: since we don't want the func_door to be visible in-game, well set this to
Dont Render / None.
- Speed: changing this will effect how fast the door will open and close. Usually, this is set to 400 for a fast moving door, which allows quick passage. Set it to a lower value to make the door close and open at a slower rate.
- Delay Before Reset: Set this to -1 so that the door will never close as long as someone is in the doorway. Otherwise, the door will close and NOT reopen until everyone has cleared the trigger. Anything other then a
-1value can lead to griefing (i.e. one player locking an entire team in the spawnroom).
- Lip: Used to adjust how far the door sticks out of (or goes into if you use a negative number) the surrounding structure. For this tutorial the value is 3. The lip is set in Hammer units.
- Move direction: This is the final thing to edit and the most important. We want this door to open upwards, so we'll set it to Up. However, you may set it to move in any direction, just make sure players can get past the door after spawning. For rotating doors, use the func_door_rotating entity.
Now reselect the door prop, and parent it to the
func_door you have just created, door_spawnroom_red_01.
Next, create a
filter_activator_tfteam, name it something appropriate, such as filter_redteam, and set the team filter to RED.
The final thing to make is a
trigger_multiple that will tell the door when to open and close. The trigger should be large enough to accommodate player size and allow for the door to fully reach its open state before the player gets to it. It may be a good idea to stretch the trigger volume so that it can be activated from either side of the door, instead of making two trigger volumes. Also, make sure you set its filter property to the filter you have created for the door (filter_redteam) so only members of the red team can activate the trigger and open the door. It is probably a good idea to set "Delay before reset" to 0, otherwise the door will remain open once activated.
Now it's time to edit the Outputs tab for our trigger_multiple. Your outputs should match those in the table below:
My Output Target Entity Target Input Parameter Delay Only Once OnEndTouchAll door_spawnroom_red_01 Close 0.00 No OnStartTouchAll door_spawnroom_red_01 Open 0.00 No
That's it, you just finished making a spawn room! Still, don't forget about lighting and details. A map in Team Fortress 2 may have anywhere from one to three or more spawn rooms per team depending on the map's objectives.
A respawn room's location and arrangement will directly affect the pacing of a map. It's a good to have a rough idea of how you want your map laid out and how much time it will take players to reach the objectives when choosing their location. The respawn times and the distance to the next major chokepoint (i.e. the next area they are most likely to come into contact with the enemy) will have a major effect on the way the map plays.
Your spawnroom should not only provide players with a place to heal up, but a quick break from the action as well. If you're creating a map for public play, keep in mind many TF2 servers have a 10 to 20 second respawn time after a player dies before they can rejoin the action. If one team can easily exploit the layout of your spawnroom, you'll have players spend that 10 to 20 seconds waiting to respawn only to be greeted by another 10 to 20 second wait when they're killed by the enemy team immediately after spawning. Many players can, and will, exploit any flaws in your map's design.
Spawncamping cannot be eliminated from the game, but below are a few pointers on minimalising the effectiveness of spawncamping:
- Try to keep your
info_player_teamspawnentities far from the entrance(s), so that when the door is open the respawning team is less vulnerable to weapons' fire.
- Similarly, any resupply cabinets should be far enough back in the room to avoid the above, but close enough to the entrance to make resupplying a quick and easy process (placing them around corners works best).
- Make sure the entrance to the spawnroom is roughly 3 persons wide; if the exit is too narrow, a spawncamper will only have to aim at one spot.
- Also, avoid placing spawn exits at the beginning of long tunnels into the rest of the level, or in cramped spaces; give respawning players multiple routes they can take as soon as they spawn and enough space to avoid weapons' fire on the other side of the door.
- Avoid having windows that allow the opposite team to look into the spawnroom; this will only make it easier for them to know when to reload, seek ammo/health, etc.
- If the spawnroom has two exits, try to ensure they are not within line of sight of each other, so that both cannot be camped by one person at the same time.
- Do NOT place spawn rooms next to important locations such as choke-points, capture points, or the intel. This leads to protracted stalemates. An example of this mistake can be found in 2Fort: the spawn room is right next to the courtyard which must be passed through in order to get to the intel.