Create a capture the flag map for Team Fortress Classic

From Valve Developer Community
Jump to: navigation, search


This tutorial will describe how to set up flags to be used in Capture The Flag gamemode. It will not cover flags for use in Controlpoint maps or Attack/Defend maps.

Setting up the capture Points

Blue Capture Point

The Blue capture Point should be placed in the Blue Base. This point is used for blue team to capture the red flag.


Start by creating a 128x128 platform. Texture the sides of the platform with STRIPES2 and the top with TEAM1A. Tie the platform into a func_wall entity.


Now comes to work of creating the capture zone itself. Create a brush of the same size 8 units above the platform using the texture AAATRIGGER. Now tie this brush into a i_t_g entity.

Set the keyvalues in the i_t_g entity as following:

Entity Reference Name = Blue_Cap

Goal # = 10

Goal initial state = Inactive

Team Allowed To Use Goal = Blue

Has item # = 2

Stay Active = 10

Remove Item From APA = 2

Add/Subtract Frags = 10

Add/Subtract Health = 100

Armor Value % = 300

Blue Point Gain = 10

Owned by-For MSG and item glow = Red

Message to AP = #2fort_you_capped_flag

Message to AP Team = #2fort_your_team_capped

Message to Owner Team = #2fort_your_flag_capped

Console msg to all = %s capped the Red flag\n

Speak (AP) = !CTF_YOUCAP

Speak (AP Team) = !CTF_TEAMCAP

Speak (non-AP Team) = !CTF_THEYCAP

Now you've got the blue Capture Point working. Let's move on to the red Cap-Point.

Red Capture Point

Creating the red capture point is pretty much the same as the blue one except for some minor changes. First, create the platform, this time however, you should use the TEAM2A texture for the top.


Then create the i_t_g on top of it like last time but put this keyvalues into it instead:

Entity Reference Name = Red_Cap

Goal # = 20

Goal initial state = Inactive

Team Allowed To Use Goal = Red

Has item # = 1

Stay Active = 10

Remove Item From APA = 1

Add/Subtract Frags = 10

Add/Subtract Health = 100

Armor Value % = 300

Red Point Gain = 10

Owned by-For MSG and item glow = Blue

Message to AP = #2fort_you_capped_flag

Message to AP Team = #2fort_your_team_capped

Message to Owner Team = #2fort_your_flag_capped

Console msg to all = %s capped the Blue flag\n

Speak (AP) = !CTF_YOUCAP

Speak (AP Team) = !CTF_TEAMCAP

Speak (non-AP Team) = !CTF_THEYCAP

Setting up the Flags

Blue Flag

The blue flag can be placed anywhere. Some maps have one capture point room and one flag room, while other maps have the flag and the capture point in the same spot. It's up to you to decide what would benefit your map the best.


The blue flag is supposed to be captured by the red team, and defended by the blue team.

Create an item_tfgoal and give it the following keyvalues:

Entity Reference Name = Blue_Flag

Item # = 1

Goal Initial State = Inactive

Model Path/name.mdl = models/flag.mdl

Model Skin-Varies Per Model = 2

Team Allowed To Use Goal = Red

Owned by-For msg and item glow = Blue

Message to AP = You have the ENEMY flag!\nTake it back to base!\n

Console msg. to all = #2fort_got_enemy_flag

Console msg. to AP team = #2fort_team_takes_enemy_flag

Console msg. to non-AP team = #2fort_enemy_takes_flag

Console msg. to owner team = #2fort_your_flag_taken

Speak (AP) = !CTF_YOUGOTFLAG

Speak (AP team) = !CTF_GOTFLAG

Speak (non-AP team) = !CTF_LOSTFLAG

Goal Activation Bitfields = 4789(this setting does not appear in the drop down list, it must be typed in manually)

Pause (Stays on ground) = 60

Activate/Restore goal on return = 100

Goal Result Bitfields = 16

Center msg. death drop, owner team = #2fort_enemy_lost_flag

Center msg. death drop, non-woner team = #2fort_lost_enemy_flag

Console msg. death drop, owner team = #2fort_lost_blue_flag

Console msg. death drop, non-owner team = #2fort_lost_blue_flag

Return to start msg. team = #2fort_your_flag_returned

Return to start msg. owner = #2fort_your_flag_returned

Highlight HUD items bitvalue = Blue Logo

Now you should have a working blue flag.

Red Flag

Almost the same thing as the blue flag. Create an item_tfgoal and give it the following keyvalues:

Entity Reference Name = Red_Flag

Item # = 2

Goal Initial State = Inactive

Model Path/name.mdl = models/flag.mdl

Model Skin-Varies Per Model = 1

Team Allowed To Use Goal = Blue

Owned by-For msg and item glow = Red

Message to AP = You have the ENEMY flag!\nTake it back to base!\n

Console msg. to all = #2fort_got_enemy_flag

Console msg. to AP team = #2fort_team_takes_enemy_flag

Console msg. to non-AP team = #2fort_enemy_takes_flag

Console msg. to owner team = #2fort_your_flag_taken

Speak (AP) = !CTF_YOUGOTFLAG

Speak (AP team) = !CTF_GOTFLAG

Speak (non-AP team) = !CTF_LOSTFLAG

Goal Activation Bitfields = 4789(this setting does not appear in the drop down list, it must be typed in manually)

Pause (Stays on ground) = 60

Activate/Restore goal on return = 200

Goal Result Bitfields = 16

Center msg. death drop, owner team = #2fort_enemy_lost_flag

Center msg. death drop, non-woner team = #2fort_lost_enemy_flag

Console msg. death drop, owner team = #2fort_lost_red_flag

Console msg. death drop, non-owner team = #2fort_lost_red_flag

Return to start msg. team = #2fort_your_flag_returned

Return to start msg. owner = #2fort_your_flag_returned

Highlight HUD items bitvalue = Red Logo

Flag return VOX

It's nice to have messages when a flag returns so you don't spend the entire round looking for the enemy flag when it has returned to their base.

Blue flag return VOX

Create an info_tfgoal and give it the following keyvalues:

Entity Reference Name = Blue_Flag_Vox Goal # = 100

Goal Initial State = Inactive

Team Allowed To Use Goal = Blue

If goal # is inactive = 20

Owned by-For msg. and item glow = Red

Speak (Owner team) = !CTF_EFLAGBACK

Speak (non-owner team) = !CTF_FLAGBACK

Red flag return VOX

Create an info_tfgoal and give it the following keyvalues:

Entity Reference Name = Red_Flag_Vox Goal # = 200

Goal Initial State = Inactive

Team Allowed To Use Goal = Red

If goal # is inactive = 10

Owned by-For msg. and item glow = Blue

Speak (Owner team) = !CTF_EFLAGBACK

Speak (non-owner team) = !CTF_FLAGBACK

Conclusion

Now you should have a working flag setup complete with capture Points and return VOX.