This article relates to the game "Team Fortress 2". Click here for more information.

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

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
m (Setting bug notice hidetested=1 param on page where the bug might not need tested in param specified)
 
(49 intermediate revisions by 24 users not shown)
Line 1: Line 1:
These Goal Systems use [[item_teamflag]] entities to determine how a team scores points.  Flags must be carried by players to [[func_capturezone]] [[Entity_Creation#Brush-based_entity_creation|brush-based entities]], which act as drop-off points.  Though they are called "flags," [[item_teamflag]]s are actually represented by Intelligence Briefcases in Team Fortress 2.
{{LanguageBar}}
{{TF2 topicon}}


The entities and input/output system may allow us to do some interesting things with Flags in TF2.


==Tutorial - Basic CTF==
'''Flag-based goal systems''' use {{ent|item_teamflag}} entities to determine how a team scores points. Flags must be carried by players to {{ent|func_capturezone}} [[Entity creation#Brush-based_entity_creation|brush-based entities]], which act as drop-off points. Although they are called "flags," {{ent|item_teamflag|alt = item_teamflags}} are actually represented by {{tfwiki|Capture_the_Flag#Intelligence|intelligence briefcases}} in {{tf2|4}}.
Capture the Flag is the most basic flag-based goal system, consisting of one flag per team, and one drop-off point per team. There is only one official CTF map so far, the ubiquitous [[TF2/ctf_2fort|ctf_2fort]].


This tutorial will show you how to setup a complete Basic CTF Goal System.
The entities and [[Inputs and Outputs|input/output system]] may allow us to do some interesting things with Flags in {{tf2|3.1}}.


===Landmarks===
[[image:CaptureTheFlag-Emtpy Blocks.jpg|thumb|right|200px|The empty pedestals.]]
First, create a couple of landmarks to act as a location for the intelligence briefcase, and a marker for the capture zone.  This is not strictly necessary, but helps new players to quickly learn your map.  For the example, we will use a pair of simple blocks as pedestals.  We'll do this one team at a time, so we're putting both of these on the Red side of the map for now.


===The item_teamflag===
== Basic CTF ==
Next, create an [[item_teamflag]] entity and put it on your flag landmark.  This will be the briefcase itself.  Set its Team property - we'll start with the Red team in our example.
{{ABSGametypeLib}}


===The func_capturezone===
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 seven official CTF maps for ''Team Fortress 2'' so far: ''ctf_well'' and ''ctf_sawmill'', which are conversions of other maps; the ubiquitous ''ctf_2fort''; the user-contributed ''ctf_turbine'' and ''ctf_landfall''; ''ctf_2fort_invasion'', which has a drastically different theme from the original; and ''ctf_doublecross''. In December 2020, ''ctf_snowfall'', a Christmas-themed reskin of Landfall, was also added, though it was removed the following January.
[[image:CaptureTheFlag-Done.jpg|thumb|right|200px|The Red team's briefcase-flag and capture zone.]]
Finally, create a [[func_capturezone]] [[Entity_Creation#Brush-based_entity_creation|brush-based entity]] around 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 stretch it all the way to the ceiling to make sure jumpy scouts can score too.  Also set the [[func_capturezone]]'s Team property - we're still working with the Red team in our example.


===Finishing Up===
This tutorial will show you how to setup a complete basic CTF goal system.
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 the demo map here: (no link yet){{clr}}
=== 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.


==Neutral Flag CTF==
==== Flag Landmark====
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.  Also, the mission briefing will be the usual CTF mission briefing, even if there is only one neutral flag on the map.
[[File:Tf2_ctf_bas_lm1.jpg|thumb|right|100px|The empty pedestals.]]
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 {{Code|wood/grain_elevator_facade_14a}} texture, and tie it to the {{ent|func_detail}} entity.


==Multiple Flag CTF (Simultaneous)==
{{clr}}
 
==== Capture Zone Landmark ====
[[File:Tf2_ctf_bas_lm2.jpg|thumb|right|100px|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 {{Code|props/hazardstrip001a}} texture and tie it to a {{ent|func_detail}} entity as well.  Also, select the {{Code|signs/capture_zone}} texture and place it inside the border as an overlay.
 
{{clr}}
 
=== The item_teamflag ===
Next, create an {{ent|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 ===
[[File:Tf2_ctf_bas_czone.jpg|thumb|right|100px|The RED team's briefcase-flag and capture zone.]]
Finally, create a {{ent|func_capturezone}} [[Entity creation#Brush-based entity creation|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 {{ent|func_capturezone}}'s team property to RED.
 
{{clr}}
 
=== 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
 
[[File:Tf2_ctf_bas_note.jpg|thumb|right|100px|Carrier message]]
{{Note|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".}}
 
== Special Delivery ==
In Special Delivery, both teams are attempting to take the neutral flag from the drop site to the neutral capture zone.  This game mode also added the ability for triggers that only work when the flag carrier is present, which is used in the official Valve map ''sd_doomsday''.
 
The flag also uses custom capture and return announcements.
 
There is only one official SD map: ''sd_doomsday''.
 
== Neutral flag CTF ==
When an {{ent|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. {{bug|hidetested=1|Keep in mind, while carrying a neutral flag, the [[HUD]] element will show that you are carrying an enemy flag.}}
 
== 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 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. 
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
 
Hopefully this will get fixed eventually and open up some new possibilities for MultiCTF mapping.


==Tutorial - Multiple Flag CTF (Sequential)==
== 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.
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===
=== Name your flags ===
First, make sure you have a few [[item_teamflag]]s 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_capturezone]]s for each team as well.
First, make sure you have a few {{ent|item_teamflag|alt = 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 {{ent|func_capturezone|alt = func_capturezones}} for each team as well.


===Start Disabled===
=== 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.
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===
=== Setup their outputs ===
[[image:MultiCTF-Sequential.jpg|thumb|right|200px|The second flag in the multiple sequence, and its outputs.]]
[[File:MultiCTF-Sequential.jpg|thumb|right|200px|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:
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:


{| border="1"
:{| {{OutputsTable}}
! Output || Target Entity || Via Input
| [[File:Io11.png]] || OnCapture || flag2 || Enable ||   || 0.00 || No
|-
| OnCapture || flag2 || Enable  
|-
| OnCapture || flag1 || Disable
|-
|-
| [[File:Io11.png]] || 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.
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.
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: (no link yet){{clr}}
<!-- Download the demo map here: -->{{clr}}


==Reverse CTF==
== 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.
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==
== Football CTF ==
This is Reverse CTF with neutral flags. With a single flag, the result is similar to the sport of football or the [http://en.wikipedia.org/wiki/Bombing_Run Bombing Run] gametype 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.
This is Reverse CTF with neutral flags. With a single flag, the result is similar to the sport of football or the [http://en.wikipedia.org/wiki/Bombing_Run 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==
== 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.
* 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. (Is there a way to set that manually somewhere?)
* 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 [[TF2/Modifying the Mission Briefing|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.
* Flag and capture zone locations usually feature landmarks, such as the desk in ctf_2fort, to make them easy to identify.


==See Also==
== See also ==
[[Team_Fortress_2_Level_Creation|Back to Level Creation Page.]]
* [[TF2/Flag Game Types|List of flag game types]]
* [[Team Fortress 2 Level Creation]]
[[Category:Level Design]]
[[Category:Team Fortress 2]]

Latest revision as of 07:13, 20 May 2025

English (en)한국어 (ko)Русский (ru)Translate (Translate)


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 Tfwiki favicon.png intelligence briefcases in Team Fortress 2 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

This gametype is included in A Boojum Snark's Team Fortress 2 Gametype Library

The complete entity setup for this gametype is included in "A Boojum Snark's Team Fortress 2 Gametype Library," a downloadable VMF that includes all official Team Fortress 2 gametypes. The entities can easily be transferred from the VMF to your own custom map without the hassle of having to build it yourself or debugging it.

"A Boojum Snark's Team Fortress 2 Gametype Library" can be downloaded here: TF2Maps.net

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 seven official CTF maps for Team Fortress 2 so far: ctf_well and ctf_sawmill, which are conversions of other maps; the ubiquitous ctf_2fort; the user-contributed ctf_turbine and ctf_landfall; ctf_2fort_invasion, which has a drastically different theme from the original; and ctf_doublecross. In December 2020, ctf_snowfall, a Christmas-themed reskin of Landfall, was also added, though it was removed the following January.

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

Special Delivery

In Special Delivery, both teams are attempting to take the neutral flag from the drop site to the neutral capture zone. This game mode also added the ability for triggers that only work when the flag carrier is present, which is used in the official Valve map sd_doomsday.

The flag also uses custom capture and return announcements.

There is only one official SD map: sd_doomsday.

Neutral flag CTF

When an 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.

Icon-Bug.pngBug:Keep in mind, while carrying a neutral flag, the HUD element will show that you are carrying an enemy flag.

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.

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:

  My Output Target Entity Target Input Parameter Delay Only Once
Io11.png OnCapture flag2 Enable   0.00 No
Io11.png 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

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