func_capturezone

From Valve Developer Community
Revision as of 08:56, 24 January 2023 by REDESAILE (talk | contribs)
Jump to navigation Jump to search
English (en)Translate (Translate)

Template:Entity

C++ In code, it is represented by theCCaptureZoneclass, defined in thefunc_capture_zone.cppfile.

Entity description

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

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

SetTeam <integerRedirectInput/integer>
Changes the entity's team.

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.