func_capturezone

From Valve Developer Community
Jump to: navigation, search
Underlinked - Logo.png
This article needs more Wikipedia icon links to other articles to help Wikipedia icon integrate it into the encyclopedia. Please help improve this article by adding links Wikipedia icon that are relevant to the context within the existing text.
January 2024
English (en)Translate (Translate)
Class hierarchy
CCaptureZone
CCaptureZoneShim
CBaseTrigger
CBaseToggle
CBaseEntity
func_capture_zone.cpp

func_capturezone is a brush entity available in Team Fortress 2 Team Fortress 2.

This entity is used in conjunction with item_teamflag for Capture the Flag maps. (For capture points in CP maps, use a trigger_capture_area.)

It should be placed where it can be touched by the player so that when they are carrying the enemy intelligence, it can be captured. You only need to specify which team the capture zone belongs to (set Team to 'any' for Territory Control maps).

Keyvalues

Name (targetname) <string>
The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g. parentname or target).
Also displayed in Hammer's 2D views and Entity Report.
See also:  Generic Keyvalues, Inputs and Outputs available to all entities

Capture Point (CapturePoint) <integer>
Used for Attack/Defend and Territory Control maps ONLY. This is ignored for CTF maps. Set this value to the Capture Point number for this entity.
Capture Delay (capture_delay) <float>
Only used on Player Destruction maps, this is the default number of seconds between captures when the player is touching the area.
Capture Delay Offset (capture_delay_offset) <float>
Only used on Player Destruction maps, this is amount of time to reduce the Capture Delay per player on the server.
Capture Blocking (shouldBlock) <boolean>
Only used on Player Destruction maps, this determines whether multiple teams in the zone will block each other from captures.
TeamNum:
Initial Team (TeamNum) <choices>
Which Team the entity belongs / is assigned to on spawn
  • 0: None
  • 1: Spectator/Halloween Souls Team Fortress 2
  • 2: RED Team Fortress 2
  • 3: BLU/Robots Team Fortress 2
  • 5: Halloween Bosses (only in Team Fortress 2) !FGD


Start Disabled (StartDisabled) <boolean>
Stay dormant until activated (with theEnableinput).

Flags

TFTeam:

SetTeam <integer>
Changes the entity's Team keyvalue.

Inputs

EnableDisable:

Enable / Disable
Enable/disable this entity from performing its task. It might also disappear from view.

Outputs

OnCapture
Sent when a flag is captured in this zone.
OnCapTeam1
Sent when RED captures a flag in this zone.
OnCapTeam2
Sent when BLU captures a flag in this zone.
OnCapTeam1_PD
Sent when RED captures a point in this zone during Player Destruction mode.
OnCapTeam2_PD
Sent when BLU captures a point in this zone during Player Destruction mode.