TF2/Creating a Spawnroom

From Valve Developer Community
< TF2
Revision as of 10:33, 27 September 2007 by Baliame (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Creating your room

Error creating thumbnail: File missing
A simple, poorly textured room.

First of all, you will want to have an area which you consider the spawnroom. This may be of any shape, color and size. For this example, I'm going to turn the simple, poorly textured room you see on the right into a complicated yet still poorly textured spawnroom for the RED team.

Making it a respawn room

Error creating thumbnail: File missing
Fill the room with func_respawnroom.

Create a brush that fills your room and texture it with the tools/toolstrigger material. Now make this brush an entity by clicking the ToEntity button on the right side toolbar. Choose the "func_respawnroom" entity from the dropdown list. Name it "red_respawn_room" and make it's team Red. You can see the non-smartedit details on the picture. This room is now officially claimed as a respawn room.

Bring the players inside

Error creating thumbnail: File missing
Now add 12-16 playerspawns to your room with space inbetween.

Now that we have a spawnroom half-setup, we need to add the playerspawns. Add a point entity to your room anywhere called "info_player_teamspawn". Before adding more, set the important details up in this one. You will need to change the team to RED. The other details can be used to make more advanced respawn mechanisms which are, naturally, not covered in this tutorial. Now, copy the playerspawns around 12-16 times and make sure there is plenty of space between them.

Respawn and resupply

Error creating thumbnail: File missing
Add a resupply somewhere obvious.

While this is not obligatory, it is good to have a resupply area inside your respawn. A resupply consists of 2 things: a "prop_dynamic" representing the resupply locker and a "func_regenerate" which helps you to the contents of it. Create a prop_dynamic somewhere in the room and change it's model to "models/props_gameplay/resupply_locker.mdl" and name it "resup1". Put it against a wall so it looks nice. Now create a trigger brush which is way bigger than your resupply locker. Attach it to a func_regenerate entity. Set the entity's "Associated Model" to "resup1" and Team to RED. Repeat this as many times as you want to make multiple cabinets.

Keeping off the nasties

Access denied.

Unfortunately, people like to rampage around in spawnrooms, "spawnkilling" people who just took control of their characters. There, however, is an easy solution. Create a brush in the doorway. Assign the "tools/nodraw" texture to the brush, except for the face that looks at the outside world. This face should be textured with "overlay/no_entry". Tie it to the entity "func_respawnroomvisualizer". The only property you'll need to change is the "Associated Respawn Room", which should be the func_respawnroom we previously created, the one that goes by the name red_respawn_room. This will let red players go through but block off blu players.

Last words

It's easy to create a basic spawnroom. As you can see, it's still extendable, but it's all up to you now. You might want to create a door that only opens for red players, multiple spawn rooms, each associated to a control point, and so on. This is going to be covered in a later tutorial though. Until then, have fun making maps!