TF2/Flag Based Goal Systems
Flag-based goal systems use
item_teamflag entities to determine how a team scores points. Flags must be carried by players to
func_capturezone brush-based entities, which act as drop-off points. Although they are called "flags,"
item_teamflags are actually represented by intelligence briefcases in Team Fortress 2.
The entities and input/output system may allow us to do some interesting things with Flags in Team Fortress 2.
- 1 Basic CTF
- 2 Neutral flag CTF
- 3 Multiple flag CTF (simultaneous)
- 4 Multiple flag CTF (sequential)
- 5 Reverse CTF
- 6 Football CTF
- 7 Design theory
- 8 See also
The most common capture the flag game type, retrieve the flag from the enemies base and take it to your own to capture it. A basic CTF map has a simple flag-based goal system, consisting of one flag spawn point per team and one drop-off point per team, with both points usually lying in the same location. There are four official CTF maps for Team Fortress 2 so far: ctf_well and ctf_sawmill, which are conversions of other maps; the ubiquitous ctf_2fort, and the user-contributed ctf_turbine.
This tutorial will show you how to setup a complete basic CTF goal system.
First, create a couple of landmarks to act as a location for the intelligence briefcase to spawn in and also for the capture zone. This is not strictly necessary, but it will help new players to quickly learn your map.
For the example, we will use a pair of simple blocks to serve as pedestals for the intelligence, one for each team. Start with the RED team's side of the map and make a brush 96 by 80 units that is 48 units high, texture it with the
"wood/grain_elevator_facade_14a" texture, and tie it to the "
Capture Zone Landmark
Now to create a landmark for the capture zone. In this example, we will simply place the landmark for the capture zone in the same location as the landmark for the intelligence. Create a brush-based border that is 16 units wide and 2 to 4 units high around the pedestal. Texture it with the "
props/hazardstrip001a" texture and tie it to a"
func_detail" entity as well. Also, select the "
signs/capture_zone" texture and place it inside the border as an overlay.
Next, create an
item_teamflag entity and put it on your flag landmark. This will be the briefcase itself. Since were going with the RED team in our example, so set the team property to RED.
Finally, create a
func_capturezone brush-based entity over your capture zone landmark. This defines the area in which the enemy briefcase can be returned to score points. In our example, we'll define it as a column above our capture zone pedestal. We'll make it 160 units high to be sure jumpy scouts can score too. Again set the
func_capturezone's team property to RED.
You now have all you need for the RED team, and just need to repeat the process for the blue team. Once that is done, you will have a fully functioning capture the flag map! With these entities in place, the map briefing will automatically be filled out with the CTF description, and the win condition for the round will be set to 3 captures.
Download an example map here:
Neutral flag CTF
item_teamflag has its team set to any, it is considered neutral and either team can pick it up and take it to their capture zone to score. Neutral flags have a white skin variant of the briefcase, and a grey return timer above them during gameplay.
Multiple flag CTF (simultaneous)
A player can score using any flag that doesn't belong to his team. So, theoretically, you could have as many flags as you wanted on your map.
A player can carry as many flags as he can find, but will only be able to turn in one of those flags - the rest will get stuck with him. The bug where players would pick up an unlimited number of flags has been fixed, as you can no longer carry more than one flag. However, this does not disallow multiple flags, as you can have as many flags as you please in your map. This fix is also an insight to Valve's intentions for Neutral Flags
Multiple flag CTF (sequential)
This technique allows you to change the position of the flags between captures. This way, you can make a team's second capture harder than its first, move a neutral flag around each time it's captured, or any number of other interesting tweaks to standard CTF.
Name your flags
First, make sure you have a few
item_teamflags placed on your map, and give them all names. We'll be using three in our example, each with their team set to any (neutral), called flag1, flag2, and flag3. Don't forget your
func_capturezones for each team as well.
All of your flags should have the Start Disabled property set to yes except the ones you want to have on the map when the round starts. In our example, flag1 is the only one with Start Disabled set to no.
Setup their outputs
Select the flag you want available first; flag1 in our example. You will need to setup a couple of outputs. One to turn the next flag on, and another to turn this one off. They should look like this:
My Output Target Entity Target Input Parameter Delay Only Once OnCapture flag2 Enable 0.00 No OnCapture flag1 Disable 0.00 No
Do the same for the other flags, turning on the next in the sequence and disabling the current flag. When you get to the last one, you can loop around and turn the first one on again.
You now have three flags, of which only one will be active at a time! We used neutral flags in the example, but you could do this for both team's flags to get a really dynamic CTF map.
Reverse CTF is a simple variation on basic CTF in which the position of the flags and capture zones are reversed - put on the opposite side of the map. Instead of retrieving a defended flag, the goal is to deliver a flag from the friendly end of the map to a defended capture zone.
This is Reverse CTF with neutral flags. With a single flag, the result is similar to the sport of football or the Bombing Run game type in the Unreal Tournament series, in which both teams fight to carry the flag into the capture zone on the enemies' end of the map.
- A flag room should have enough space for both defenders and attackers, more than one entrance, a few good sentry positions, and some cover from those sentry positions.
- The mission briefing appears to be the regular CTF briefing no matter what kind of funky things you do with the entities. It is possible to manually change the mission briefing.
- Flag and capture zone locations usually feature landmarks, such as the desk in ctf_2fort, to make them easy to identify.