trigger_capture_area

From Valve Developer Community
Jump to navigation Jump to search
English (en)Español (es)Translate (Translate)
trigger_capture_area is an entity used to make capture points.
Class hierarchy
CTriggerAreaCapture
CTriggerAreaCaptureShim
CBaseTrigger
CBaseToggle
CBaseEntity
trigger_area_capture.cpp

trigger_capture_area is a brush entity available in Half-Life 2: Deathmatch Half-Life 2: Deathmatch and Team Fortress 2 Team Fortress 2.

Capture area for a team_control_point to make a capture point. Also used to define the push/block zone around a Payload cart when a func_tracktrain is defined as its parent.

Icon-Bug.pngBug*:The HUD will show the waiting for teammate message if the control point is currently disabled.

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

Control point (area_cap_point) <targetname>
Name of the control point this area is linked to.
Can RED Cap? (team_cancap_2) <boolean>
Can RED capture this point?
Can BLU Cap? (team_cancap_3) <boolean>
Can BLU capture this point?
Number of RED players to start capping (team_startcap_2) <integer>
Number of RED players needed to begin capturing this point. If not enough players are present, the point will say, "Waiting for teammate."
Number of BLU players to start capping (team_startcap_3) <integer>
Number of BLU players needed to begin capturing this point. If not enough players are present, the point will say, "Waiting for teammate."
Number of RED players to cap (team_numcap_2) <integer>
The maximum number of RED players to affect capture time.
Number of BLU players to cap (team_numcap_3) <integer>
The maximum number of BLU players to affect capture time.
RED Spawn Adjust (team_spawn_2) <integer>
Adjust the minimum respawn time for the RED team by this amount (in seconds) when RED captures this point. If the RED team owns this point when BLU captures it, this adjustment is reversed.
BLU Spawn Adjust (team_spawn_3) <integer>
Adjust the minimum respawn time for the BLU team by this amount (in seconds) when BLU captures this point. If the BLU team owns this point when RED captures it, this adjustment is reversed.
Time to cap (sec) (area_time_to_cap) <integer>
Time to capture this area (in seconds).
Start Disabled (StartDisabled) <boolean>
Stay dormant until activated (with theEnableinput).

Inputs

CaptureCurrentCP
If a point is currently being capped, force it to cap fully.
SetControlPoint <targetname>
Set the associated control point to the name passed.
SetTeamCanCap <string>
Set whether a specific team is allowed to capture this point. Format is <team number> <0/1>; e.g., "2 0" would prevent RED from capturing this point, whereas "3 1" would allow BLU to cap it.

EnableDisable:

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

Outputs

OnStartCap
OnStartTeam1
OnStartTeam2
Sent when either/RED/BLU team starts a capture.
OnBreakCap
OnBreakTeam1
OnBreakTeam2
Sent when a capture by either/RED/BLU team is broken.
Note.pngNote:The capture progress on a point must be completely drained for the capture to be considered broken.
OnEndCap
OnCapTeam1
OnCapTeam2
Sent when either/RED/BLU team captures.
OnNumCappersChanged <integer>
Sent when the number of people in the capture area changes. The output value is the number of capturing players, regardless of if the capture is being blocked, and 0 if there are no capping players.
OnNumCappersChanged2 <integer>
Sent when the number of people in the capture area changes. The output value is the same as OnNumCappersChanged, but is -1 when the capture is being blocked.

See also