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

From Valve Developer Community
< Team Fortress 2
Revision as of 20:24, 23 July 2008 by A2h (talk | contribs) (→‎Inputs and Outputs: Changed image to a table. Someone clean up the explanations area... maybe I will but not now.)
Jump to navigation Jump to search
Broom icon.png
This article or section needs to be cleaned up to conform to a higher standard of quality.
For help, see the VDC Editing Help and Wikipedia cleanup process. Also, remember to check for any notes left by the tagger at this article's talk page.
Broom icon.png
This article or section should be converted to third person to conform to wiki standards.

This tutorial teaches about how to make a one flag map where players can play a simple game of Keep-Away. Keep away is where either everyone tries to keep an object (such as a ball) away from everyone else, or where there are teams involved. Basically, each team tries to keep the flag away from each other as long as possible.

It is assumed that you know some of the basics of CTF map creation, and as such it will only teach about the concept and creation of this type of gameplay. This tutorial also assumes you know about basic map techniques such as making a spawn room, working doors, creating brushes, etc.

Entity List

Here, are the following entities required for this.

These will be set up like any regular Capture The Flag map except for a few major differences in entity placement and properties.

Start with a regular TF2 map. All that will be taught here is the entity arrangement so it can be implemented into a map.

Starting your keep away map

Start by putting the item_teamflag in the center of the map. Double click on it in 3D view and the properties will open up. Naming it is not necessary, but it is optional (depending how the map is set up).

Note: In single flag maps the flag is always red, but can be picked up and captured by either team. That's just the way it is.

Ensure the properties of the item_teamflag are as follows.

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

These values are default values, and so you shouldn't have changed anything at all. You may have noticed the briefcase is red; this is the case when the team is set to Any and is quite simply the way it is. The briefcase can still be picked up and captured by either team.

Next, put the team_round_timer entity in the map. Put it anywhere in the map. Go into the properties and set the following fields.

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:

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
Io11.png On1SecRemain capzone Enable <none> 0.00 No
Io11.png OnFinished respawn_01 Force Respawn <none> 0.00 No
Io11.png OnFinished capzone Disable <none> 0.00 No
Io11.png OnFinished door_red_1 Lock <none> 0.00 No
Io11.png OnFinished door_blue_1 Lock <none> 0.00 No
Io11.png OnFinished game_timer Restart <none> 3.00 No
Io11.png OnFinished door_red_1 Unlock <none> 3.00 No
Io11.png OnFinished door_blue_1 Unlock <none> 3.00 No
Io11.png 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.

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.

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.

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.

Tut5.JPG

Same will be done with the blue door (assuming that it is named "door_blue_1").

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.

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.

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.


Other than that, it works great! Some people like maps in this style because it's original and hasn't been done until now. It's a new style of gameplay and is unique to TF2 at the moment. This tutorial will help others introduce this to the rest of the community so everyone can have fun playing keep-away!




P.S. I plan on editing this tutorial until I perfect this system.


--GreaseMonkey 02:39, 16 Mar 2008 (PDT)