Team Fortress 2/Creating a Single Flag Keep-Away map

By changing the Input/Output connections of the basic Team Fortress 2 Entities, a one flag game of Keep-Away can be made.
==Required Entities==
* item_teamflag
* team_round_timer
* game_forcerespawn
* func_capturezone
They will be set up like any regular Capture The Flag map except for several major differences in entity placement and properties.
==Starting a keep away map==
This is by putting the item_teamflag somewhere in the map that gives equal opportunity to both teams.
Note: In single flag maps the flag is always red, but can be picked up and captured by either team.
::
Property Name 	Description 	Value
Game Type 	Type of game this flag will be used for. Leave it as "CTF".	CTF
Team 	The team this entity belongs to. 	Any
Start Disabled	Self-explanatory 	No
Put the team_round_timer entity in the map.
::
Property Name 	Description 	Value
Name 	Name of the entity. For this example we will use "game_timer" 	game_timer
Start Disabled 	Self-explanatory 	No
Timer length (in seconds) 	Initial timer length. Set it to something like 600 for now (10 minutes). 	600
Setup timer length (in seconds)	Setup timer length. (0 = no setup time). Should be 0, because for some reason, the game can't distinguish between the two types of timers in some cases with I/O connections.	0
Reset time on round restart 	Self-explanatory 	Yes
Use countdown sounds 	Self-explanatory 	Yes
Show timer on HUD 	Self-explanatory 	Yes
The timer is now set up. Next on the entity list is game_forcerespawn.
Place the game_forcerespawn entity anywhere in the map. For this example, we will name it "respawn_01".
Now make a brush that preferably fits around the whole map and tie it to the func_capturezone entity. If not the entire map, the brush needs to be wherever any player can go with the flag). Do not hollow this brush! Texture it with either nodraw, or the trigger texture. The trigger texture is preferable due to it being partly transparent in hammer. Use the following properties:thumb|right|An example
::
Property Name 	Description 	Value
Name 	Name of the entity. For this example we will use "capzone"	capzone
Start Disabled	Self-explanatory 	Yes
Team 	Self-explanatory 	Any
==Inputs and Outputs==
Almost all of this is activated within the team_round_timer because time is what determines the way the game plays out. The way this will work is that when the ten minutes are up, the team holding the flag gains the point.
Go into the team_round_timer properties and click on the Outputs tab at the top of the properties window. Change the Target Entity entries accordingly.
::
	My Output 	Target Entity	Target Input 	Parameter	Delay	Only Once
	On1SecRemain	capzone 	Enable 	<none> 	0.00 	No
	OnFinished 	respawn_01 	Force Respawn	<none> 	0.00 	No
	OnFinished 	capzone 	Disable 	<none> 	0.00 	No
	OnFinished 	door_red_1 	Lock 	<none> 	0.00 	No
	OnFinished 	door_blue_1 	Lock 	<none> 	0.00 	No
	OnFinished 	game_timer 	Restart 	<none> 	3.00 	No
	OnFinished 	door_red_1 	Unlock 	<none> 	3.00 	No
	OnFinished 	door_blue_1 	Unlock 	<none> 	3.00 	No
	OnRoundStart	capzone 	Disable 	<none> 	0.00 	No
Here are explanations of each of the outputs you have added:
This enables the capture zone when one second remains so that it counts the point just before the round ends.
File:Tut1.JPG
Now the game needs to force players to respawn so they don't stay outside of their spawn rooms after time runs out. This simulates a round restart.
File:Tut3.JPG
Now at the same time, tell the capture zone to disable so it doesn't stay on for the next round until time runs out again.
File:Tut4.JPG
Now assuming the door to the red team spawn room is named "door_red_1", this will lock the door so players can't instantly go for the flag.
File:Tut5.JPG
Same will be done with the blue door (assuming that it is named "door_blue_1").
File:Tut6.JPG
Now put in the same stuff, except have the "Via this input" be "Unlock". Enter 3 under "After a delay in seconds of". Do this for both "door_red_1" and "door_blue_1".
Now have the timer restart itself, but after a delay of 3 seconds also. This means, the players will respawn and the timer won't start for another 3 seconds. This gives them some time to get a feeling of how this works and prepare for the round.
File:Tut7.JPG
Finally, disable the Capture zone so people can't capture as soon as they pick the flag up during the next round. An output like this has been made already, but do this just to be safe in case something else in the map is affecting the timer.
File:Tut8.JPG
==The Finished Product==
Now it should work like this:
* The game starts.
* Somebody holds the intelligence for ten minutes and gets the point for holding onto it.
* Everybody respawns and has to wait 3 seconds before the doors open and then the timer starts again.
* This gets repeated until either team has 3 points total.
==Bugs==
Known bugs:
* Occasionally, the intelligence will stay where it is if it is dropped right before the round starts. Then it will be somewhere where it shouldn't be when the round starts over.
* Also, after the first round, the countdown sounds won't play. So, after the first round, the sounds won't play again.
== See also ==
*Flag based goal systems
*Team Fortress 2 Level Creation
Creating