<<PREV

TFC Capture the Flag Tutorial (part 1 of 4)

NEXT>>


Team Fortress Classic

Capture The Flag Tutorial


Everyone who has played TFC has played a Capture the Flag style map and regardless of what some review sites say about them they are still the most popular type of map for public servers. In this tutorial I'll show you how to set up a fully functional CTF system and, more importantly, explain how and why it works. So lets crank up WorldCraft and get to it...


Preamble

I am assuming in this tutorial that you are completely familiarized with WorldCraft 3.x and understand how to do the basics like placing and texturing brushes as well as how to place and edit entities. TFC editing is not easy and not really geared for the faint of heart, but as long as you have a good grasp of how WC works you should do fine. In this tutorial I'll make reference to the most current game data file (fgd) but I'll also include the actual key names for the entities so and version of the tfc game data file will work.


Creating The Map

First we need to create a simple level to build and test out entities in. If you already have a map ready for the flags and cap points that is fine feel free to skip this section unless you also need to set up the default entities and spawn points. For illustration and to simplify my screenshots complexity I'm going to use a simple box map.. 4 walls, a floor, and a sky for lighting.


Default Entities

To make our map into a TFC map the very first thing we will need to add is a info_tfdetect entity. It needs no special settings for the CTF play style so simply place the entity into your map in a convenient location.

Next we need to add an info_player_start entity. This is the view you get when you initially join a map. Place the entity at a high traffic place in the map and adjust it's facing using the compass in the entity's Object Properties dialog. This entity also requires no special handling other than the angle.

Now, if your like me, you'll want to put in your light_environment entity now so all your sky brushes will emit light. If your using Zoners Half-Life Tools to compile you will only need one light_environment entity and it's location in the map is largely irrelevant. But if your using the older Quake tools that ship with WorldCraft you'll need to place a light_environment under sky brushes you want to emit light. Under the old compile tools a sky brush will not emit light unless a line of site exists between the sky brush and a light_environment entity. So with that in mind place the light_environment entity into your map so we don't have to much around with lights. As for settings, here are some good base settings for your light_environment entities that result in quite nice lighting.
 

Entity Key Key Name Setting Description
Entity Angle (set at compass) angle  30  these two setting form the yaw, pitch, and roll for the compiler to compute the lighting from sky brushes
Pitch -75
Brightness  _light 255 255 128 200 The first 3 components are the RGB value for the color of the light and the 4th value is the brightness

Almost done with the basic entities.. all that is left are a pair of team spawn points.. one for red and one for blue. So place two info_player_teamspawn entities into the map. They will need to have a key changed to make them work for specific teams. Simply change the following
 
 

FGD Name Key Name Setting  Description
Goal Activation   g_a This setting means that everyone spawning here gets item and messages from this spawnpoint if they are set for this spawn point
Team Allowed To use Goal  team Blue (1) or
Red (2) 
The team that will spawn here
Angle (compas)  angles set as needed any player spanning at this point will be facing in the entities set direction.

OK, that does it for the basic entities. Below are some images of the map I  created for this tutorial, yours will certainly look different but as long as it has all of the components you should be all set for the next step.. adding the flags.
 


 

Now would be a good time to test compile to make sure you have no problems in the basic map. If you are having problems with getting your compiler (WC, Beaver, HLCC) set up might I suggest an alternative.. the SHLCM, created by yours truly,  is excellent for this kind of simple map and offers a super simplified interface as well as component verification. It even ships with the new Zoner's HL Tools. You can pick up a copy of it from the HLCM website



 

<<PREV

TFC Capture the Flag Tutorial (part 1 of 4)

NEXT>>