Team Fortress 2/Creating a Capture Point: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
Line 15: Line 15:
==Creating the basic layout==
==Creating the basic layout==
[[image:Tutcapzone2.jpg|right|thumb|200px|The base layout of a capture point.]]
[[image:Tutcapzone2.jpg|right|thumb|200px|The base layout of a capture point.]]
{{note|This is often used for the TF2 layout of a capture point - following it is not obligatory.  The base is not necessary.}}
{{note|This is often used for the TF2 layout of a capture point - following it is not obligatory.  The base is not necessary, but there should be some sort of indication of where a player must stand to capture the point.}}
Now that we picked the position of our capture point, it's time to lay down what makes a capture point graphical. Here is what you should do.
Now that we picked the position of our capture point, it's time to lay down what makes a capture point graphical. Here is what you should do.
* Create border brushes, of about 4-16 units height which will mark the border of the capture zone. Texture it with <code>props/hazardstrip001a</code> on top and <code>metal/ibeam001b</code> on the sides. (number 1 on picture)
* Create border brushes, of about 4-16 units height which will mark the border of the capture zone. Texture it with <code>props/hazardstrip001a</code> on top and <code>metal/ibeam001b</code> on the sides. (number 1 on picture)

Revision as of 13:16, 23 February 2008

Note.pngNote:The archive which contains the TF2 FGD file also contains a capture zone prefab, however we're going to create a capture zone without utilizing it.

Picking a good position

A decent room for a capture point.

Capture Zones should be placed in area which has

  • enough space for about 10 players.
  • two or more access routes.
  • one or two ideal position for sentry guns.
  • alternative ways of destroying the ideal sentry guns.
  • cover from ideal sentries.

You can control the last three using func_nobuild brush entities, zones which you can't build in. Not meeting these criteria, the capture point either gets too easy to capture or defend, or gets crowded rather quickly.

Creating the basic layout

The base layout of a capture point.
Note.pngNote:This is often used for the TF2 layout of a capture point - following it is not obligatory. The base is not necessary, but there should be some sort of indication of where a player must stand to capture the point.

Now that we picked the position of our capture point, it's time to lay down what makes a capture point graphical. Here is what you should do.

  • Create border brushes, of about 4-16 units height which will mark the border of the capture zone. Texture it with props/hazardstrip001a on top and metal/ibeam001b on the sides. (number 1 on picture)
  • Create capture zone floor brushes with same height as the border and pick whatever texture you want. For this tutorial, I'm going to use metal/metalfloor003a. (number 2)
  • Select all "borders" and "floors" and make it one big func_detail entity to save compile time.
  • Create a prop_dynamic in the middle, which will play in an important role later. For now, we set up a few properties. Name it prop_cap_1 and set its World Model to models/props_gameplay/cap_point_base.mdl. (number 3)
  • Optionally you may also add info_overlay entities with the material signs/capture_zone.

Promotion to capture point

It should look like this when it's done.

Two entities play a key role in creating a capture point. These are trigger_capture_area and team_control_point. In this step, we are going to create and play around with them. First, create a team_control_point entity in the middle of the capture point prop. We are going to set up a few properties, so I'm going to list them with values assigned.

  • Name: control_point_1
  • Print name: (you can set a descriptive name of the place here - selected warehouse) Warehouse
  • Group index: If you are making a one-round map, set this to the same value for all capture points.
  • Default owner: Self-explanatory. I set it to Red here.
  • Index: You should order your control points starting from 0. So if this is the nth point, set this to n-1.
  • Warn on capture: Yes
  • *team* Previous Required Point *n*: Self-explanatory. Include the name of the point here.

Now, create a brush which covers the whole capture zone (including the borders) with a height over 256. Press CTRL+T to tie it to an entity. Select trigger_capture_area from the dropdown list. Again, I'm going to list the keyvalues you will need to set.

  • Name: capture_area_1
  • Control Point: control_point_1
  • Can *team* cap?: If this is a defense map, set the value for the defending team to No, otherwise set both to Yes.
  • Number of *team* players to cap: The ideal value is 2, but if you're making a map with 5 capture points, ideally, you will want to set the first capture points' to 1, the second ones' to 2 and the middle one's to 3.
  • *team* spawn adjust: You don't want to set this too high or a team will either spawn too fast or never spawn. I set both to 5.
  • Time to cap: The closer to the headquarters, the less you will want this to be. Ideally, this should be 5-20 seconds.

This entity also should have two outputs.

Output Target Entity Via Input Parameter
OnCapTeam1 prop_cap_1 Skin 1
OnCapTeam2 prop_cap_1 Skin 2

That should conclude the basics.

Additional Possibilities

Note.pngNote:This section still requires cleanup.

Of course, simply laying out capture points without any control will only create chaos. Therefore you will need to add entities which control these capture points. Depending on the type of your map this is a team_control_point_master (if you're creating a map with only one round) or multiple team_control_point_rounds (if you're creating a round based map such as hydro).

Note.pngNote:You will still need a master for a round based game.
  • If you are creating a one-round system, then in your team_control_point_master entity, set the order of drawing the capture points in the Cap Layout field with the syntax "index1,index2 index3" where , is a line break and space is an in-line break between points. In this case, a pyramid would be displayed (gravelpit-style), with index1 on top and the other two on the bottom. You can also set whether a team can win by capturing all points or not using the Restrict Team from Winning field. Finally, you can set it to switch teams when a team wins by modifying the Switch teams on map win field. This is explained in-depth in the Creating a Linear Gameplay Map article.
Note.pngNote:Unlimited control points can be used. Index is the Index field of a control point.
  • If you are creating a round-based system, then leave the Cap Layout field empty. Also, the Restrict Team from Winning of the team_control_point_master doesn't apply. Finally, Switch Teams on Map Win only applies when a victory or defeat had been triggered (refer to dustbowl). A team_control_point_round can be set up to open or close specific doors (hydro-style) when the round begins using its Outputs. It has a new field called Priority. Higher priority rounds are played first, as you can see on dustbowl, the first round has the highest priority, therefore always played first. The Control Points This Round is a replacement field for Cap Layout, but this one requires you to enter the name of the control point, not the index. And finally, the good old Restrict Team from Winning returns here, with the usual setting.

See also