TF2/Creating a Spawnroom

From Valve Developer Community
< TF2
Revision as of 04:37, 24 February 2008 by Etset (talk | contribs) (minor tidy & category)
Jump to: navigation, search

Creating your room

A simple room.

First of all, you should have an area which you consider to be the spawnroom. This may be of any shape, color, and size. For this example, the room you see on the right will be transformed into a spawnroom for the RED team.

Note.png Note: A spawnroom may also be referred to as a respawn room or simply respawn.

Making it a respawn room

Fill the room with func_respawnroom.

Create a func_respawnroom brush-based entity with material tools/toolstrigger that fills your area. Name it something like red_respawn_room_01 and set its team to RED. Name it accordingly due to how many spawn rooms you may have for the same team.

Bring the players inside

Now add 16 spaced out player spawns to your room.

Now you need to add the player spawns. Create an info_player_teamspawn in your room. Change the spawn's team to RED. Make 15 copies of the player spawn entity, giving each of them plenty of space. Give your info_player_teamspawn entity's all the same name, for example: Team_red_player_01. This naming system can later help also with which entity spawns in what spawnroom.

Respawn and resupply

Add a resupply somewhere obvious.

It may be good to have a resupply area inside your respawn. A resupply consists of two entities:

Create a prop_dynamic somewhere in the room, set its model to models/props_gameplay/resupply_locker.mdl, and give it a name such as resup1. Now create a func_regenerate brush-based entity with material tools/toolstrigger, making sure it occupies a larger area around the prop. However note that you might need to make the volume a certain size, so that it does not create exploits in anyway. Set its Associated Model to the name given to the dynamic prop (resup1, in this article), and set its team to RED.

Keeping the bullies out

Access denied.

Some players like to camp in spawn rooms, spawn-killing players. There is, however, an easy solution to this problem, which consists of creating a barrier that blocks the spawnroom entry to players of the opposite team.

To do this, create a func_respawnroomvisualizer brush-based entity with material tools/toolsnodraw. Assign material overlays/no_entry to the side that faces away from the spawn area. Be sure to set its Associated Respawn Room accordingly.

Making a door

The final step is to make a door that will seal off (non-vis) the room from most fire. Firstly, place a prop_dynamic in the doorway and set its model to models/props_gameplay/door_slide_large_door.mdl.

Note.png Note: There are lots of other door models available. You can choose whatever you would like, but this tutorial uses this model. Also note that the door does not require a name for now, however you can name it if you wish.

Next, create a func_door entity. You should try to shape and size the brush to the exact size and width of the model door. Name it to something that helps with the current naming system depending on the number of rooms you are going to make. For example: door_red_spawnroom_01. As this entity will be only a moving scheme for the prop, texture it with nodraw.

func_door attributes you will have to change individually:

  • 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: This value will effect how long it takes for the door to close once it has been opened. A default would be 4 seconds.
  • Lip: Mainly for effect you can change this that way a bit of the door itself will be slightly sticking out. For this tutorial the value is 3. One lip equals to one unit in the Hammer Editor.
  • Move direction: This is the final thing to edit and the most important. This door should open upwards, so set it to Up. However, you may set it to any other direction to make it a sliding door. 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.


Next, create a filter_activator_tfteam, and name it to something appropriate, such as Filter_door_red_01. Lastly, set the team filter to RED.

Note.png Note:  You can set it to BLU instead, if you are making a BLU Team spawnroom.


Door outputs tf.JPG

The final thing to do is to make a trigger_multiple volume 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.

Now it's time to edit the input/output tabs. Your inputs and outputs should look like the image to the right.

Theory

That's it! You just made a spawn room. Still, don't forget about lighting and good placement in your maps. Most maps in Team Fortress 2 only have two to three rooms per team.

See also