2D Imaging / Animation
Adobe Photoshop Adobe Flash 3D Imaging / Animation
Autodesk Maya Cinema 4D Game Development Valve Hammer (Source) Web Adobe Dreamweaver AJAX HTML / CSS PHP Programming C++ Java Python
TF2: Spawn Rooms
Views: 1643
Hostgator
Submitted by: AksumkA on 6-3-09 at 04:02 pm
In: Valve Hammer
Keywords: tf2, team fortress, hammer, resupply, respawn

Step 1 – Create the spawn room


I set up a simple room (currently sans ceiling) to act as my first spawn room. I found a blue dev texture and applied it to the walls. This will help me know what spawn room belongs to what team.

 Image
I will save the fancy brush work for later. For now I like to keep it simple.

Step 2 – Create player spawns


When you select the entity tool, the default selected entity is info_player_teamspawn. This will allow you to select where players will spawn in the world. Place a few in the spawn room.
 Image

Right now the game does not know what team this spawn room belongs to. We need to fill the room with a trigger brush. Open the texture application window, click browse and filter “trigger.” Now create a brush that fills the room.
 Image

With the brush selected press CTRL + T. Under the Class drop down, select func_respawnroom. Press apply but don’t close the window, we’re not done yet.

This trigger needs some information. Give it a name, I’m going to keep it simple with “bluRespawn.” It also needs to know what team this respawn belongs to, so select Blue and hit apply again. We are done with this trigger.
 Image

Now we need to go back to the info_player_teamspawn entities we created earlier and give them some information. CTRL click all the spawns you created (select them all) and press ALT + Enter. Set team to Blue. Press apply and close the Object properties window.

Step 3 – Resupply cabinets


To create resupply cabinets we will need a prop that supports animation. Select the Entity Tool and then select prop_dynamic.
 Image

Place the entity in the map about where you want it; we can always move it later. Press ALT + Enter with it selected, select world model and then click browse. Filter resupply to find it. It should be models/props_gameplay/resupply_locker.mdl . Click OK, and then apply. We need to give this prop a name so it can receive input. Again going simple with “bluResupply1” press apply and close the window.
 Image

We need to create a new trigger brush around the cabinet. When players hit this trigger, it will give them health and ammo but also trigger the resupply locker to play the open animation.
Again, press CTRL + T with the trigger brush selected. This time select func_regenerate and press apply. We still need to name the brush, give it a team and associated model. I named it “bluResupply1trigger” team is blue, and associated model is bluResupply1. Press apply once more and close. This resupply locker is done.
 Image

If you want to add more in the same spawn room, make sure to rename everything so you don’t have a resupply cabinet opening on the other side of the room.

Step 4 – Spawn room doors


Just with the resupply cabinets we need a prop_dynamic to be our spawn room gate. The world model I am using is models/props_gameplay/door_slide_large_dynamic.mdl this one has the animation we need. Just give the door a name, I chose “bluRespawnDoor.” That is the only information the prop needs.

This is where things start to get a bit involved, just a heads up.

Using the entity tool, find and place a filter_activator_tfteam in the map. I recommend placing it next to the door. Name it “bluTeamFilter” and select team Blue.
 Image

Create a trigger brush around the door. Have it stretch a few units ahead and behind the door. Press CTRL + T and select trigger_multiple. Name it “bluRespawnDoorTrigger” and select the bluTeamFilter for the Filter Name. We will be coming back to this trigger brush in a bit.

The door prop is not solid. This means that everything will pass through it even if it looks closed. To fix this we need to put something in front of it to block these things. Create a brush with a medal texture; I am going to use metal/metaldoor001. Make the brush the size of the door prop; this included the part up top that does not move. No need to worry about the look of the texture, it will soon be invisible.
 Image

With the brush selected, press CTRL + T and select func_door…
Name it “bluRespawnDoorOuter”
Render mode to “don’t render” (default Normal)
Disable Shadows to Yes
Speed to about 300
Delay Before Reset to 4
Lip to 2
Move Direction to Up (-90 0 0)

Under Flags, uncheck Touch Opens, and check Toggle.

Under Outputs we need to link this door to the prop, so when this opens, it plays the open animation. Click Add…
My Output named : OnOpen
Targets entities named: bluRespawnDoor
Via this input: SetAnimation
With this parameter override of: open

Now do the same thing again, but OnClose with an override of close.
 Image

All this and we are still not done!

Now we can come back to the door trigger brush. Select it and go to the outputs tab. Add…
output named: OnStartTouchAll
targets: bluRespawnDoorOuter
Via input: open

And once more with OnEndTouchAll and Close
 Image

Right now, if a blu player had the gate open, a red player would be able to get into the blu spawn. To fix this, we need to make a func_respawnroomvisualizer. This time we are going to use the Nodraw texture to cover the brush before we make it. Place the brush in a way that it covers almost the entire gate. It does not have to cover the entire thing, but just enough so players can’t slip past it. Press CTRL + T and select func_respawnroomvisualizer. Set the Associated Respawn room to the respawn trigger in that base. You can now select the face that is facing outward and apply the overlays/no_entry texture. I recommend pressing the fit button so it does not repeat.
 Image

Now that you have the blu respawn done, all you have to do it copy it, and paste it where you want the red respawn. You will have to rename everything and set what was blue to red, but now that hard part is done, this should not seem as bad!

If you want to download the simple map I made while making this tutorial, you can grab it over here.

If you need any more help, feel free to ask in our forums!