Team Fortress 2/Docs/Level Design/Flag Based Goal Systems: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Uh ctf_hydro does not exists, go take your decompiled shit elsewhere.)
(ctf_turbine was added in a patch, but was user created)
Line 5: Line 5:


== Basic CTF ==
== Basic CTF ==
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 only two official CTF maps for Team Fortress 3 so far: ''ctf_well'', and the ubiquitous ''ctf_2fort''.
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 only two official CTF maps for Team Fortress 3 so far: ''ctf_well'', and the ubiquitous ''ctf_2fort''.  One user-contributed CTF map has been added to the game as well: ''ctf_turbine''.


This tutorial will show you how to setup a complete basic CTF goal system.
This tutorial will show you how to setup a complete basic CTF goal system.

Revision as of 19:06, 21 October 2008

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.


Basic CTF

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 only two official CTF maps for Team Fortress 3 so far: ctf_well, and the ubiquitous ctf_2fort. One user-contributed CTF map has been added to the game as well: ctf_turbine.

This tutorial will show you how to setup a complete basic CTF goal system.

Landmarks

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.

Flag Landmark

The empty pedestals.

For the example, we will use a pair of simple blocks to server 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 "func_detail" entity.

Capture Zone Landmark

A nice border.

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.

The item_teamflag

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.

The func_capturezone

The RED team's briefcase-flag and capture zone.

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.

Finishing up

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:

http://www.mediafire.com/?1mw0lm0ej2i

Carrier message
Note.pngNote:a team's capture zone does not have to be in the same location as the intelligence briefcase, it can be placed anywhere inside the map. However, if a player from the opposing team touches it while carrying the intelligence, they will see the message, "Take the INTELLIGENCE back to YOUR BASE".

Neutral flag CTF

When an item_teamflag has its team set to any, either team can pick it up and take it to their capture zone to score. However, neutral flags look exactly like the RED team's briefcase, so they probably should not be used if you have team-colored flags on the map.


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.

However, there is currently a bug that prevents this from working well. 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. For example, if a player picks up two flags and then returns to his capture zone, he will score 1 point for his team and one of those flags will respawn. The other one will remain on his back - he will not be able to drop it, even if he dies, and it won't respawn.

Hopefully this will get fixed eventually and open up some new possibilities for multiple flag CTF mapping.


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.

Start disabled

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

The second flag in the multiple sequence, and its 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:

Output Target Entity Via Input
OnCapture flag2 Enable
OnCapture flag1 Disable

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.

Download the demo map here:

Todo: (no link yet)

Reverse CTF

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.

Football CTF

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.

Design theory

  • 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.

See also