Team control point round: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
 
 
(26 intermediate revisions by 12 users not shown)
Line 1: Line 1:
==Entity Description==
{{this is a|logical entity|name=team_control_point_round|game=Team Fortress 2}}
Control Point Round (you may have as many of these in the map as you would like). <!-- second in command -->
{{stray ent|{{hl2dm}}}}
 
==Entity description==
==Availability==
This entity tells the game how to split your map into rounds, with each entity describing a single round. You may have as many of these in the map as you would like. This entity is required on multi-stage maps like Dustbowl and Goldrush. {{tip|Use this entity's <code>OnStart</code> and <code>OnEnd</code> outputs to control spawnrooms and block off any areas of the map that aren't used in the relevant round.}}
This point [[entity]] is exclusive to Team Fortress 2.


==Keyvalues==
==Keyvalues==
* {{kv targetname}}
{{KV Targetname}}
* '''StartDisabled'''
{{KV StartDisabled}}
: <[[boolean]]>
{{KV|Print Name|string|LOCALIZED name to print on the RoundInfo panel}}
* '''cpr_printname'''
{{KV|Priority|integer|The priority value for this round (must be >{{=}} 0). Higher priority rounds will be picked first. If multiple rounds have the same priority value, a random selection will be used.}}
: <string> LOCALIZED name to print on the RoundInfo panel
{{KV|Control points in this round|string|Targetnames of the control points included in this round (space delimited). Control points may belong to more than one control point round.  The names of the control points (and the rounds) should all be unique.}}
* '''cpr_priority'''
{{KV|Restrict team from winning|choices|Prevent this team from winning by capping all the points}}
: <int> The priority value for this round (must be >= 0). Higher priority rounds will be picked first. If multiple rounds have the same priority value, a random selection will be used.
:* 0 : Neither
* '''cpr_restrict_team_cap_win'''
:* 1 : Both
: <choices> Prevent this team from winning by capping all the points. This field is ignored if you're using control_point_rounds in your map (set this field inside the rounds).
:* 2 : Red
:{|
:* 3 : Blue
! Literal Value || Description
|-
| 0 || Neither
|-
| 2 || RED
|-
| 3 || BLU
|}
* '''cpr_cp_names'''
: <string> Names of the control points included in this round (space delimited). Control points may belong to more than one control point round.  The names of the control points (and the rounds) should all be unique. For more info, see caplayout on [[team_control_point_master]]
 
==Flags==
This entity doesn't have any flags.


==Inputs==
==Inputs==
* {{i targetname}}
{{I Targetname}}
* '''Enable'''
{{I EnableDisable}}
: Enable this entity.
* '''Disable'''
: Disable this entity.


==Outputs==
==Outputs==
* {{o targetname}}
{{O Targetname}}
* '''OnWonByTeam1'''
{{O|OnStart|Sent when this round is selected to be played.}}
: Sent when RED wins the game.
{{O|OnEnd|Sent when this round is finished.}}
* '''OnWonByTeam2'''
{{O|OnWonByTeam1|Sent when RED wins this round.}}
: Sent when BLUE wins the game.
{{O|OnWonByTeam2|Sent when BLUE wins this round.}}
* '''OnStart'''
: Sent when this round is selected to be played.
* '''OnEnd'''
: Sent when this round is finished.


==See Also==
== See also ==
[[team_control_point]]
* [[team_control_point]]
[[team_control_point_master]]
* [[team_control_point_master]]
* [[TF2/Creating a Linear Gameplay Map]]

Latest revision as of 07:46, 4 June 2025

team_control_point_round is a logical entity available in Team Fortress 2 Team Fortress 2.

Note.pngNote:This entity is also in the code for Half-Life 2: Deathmatch. Its functionality is not guaranteed.

Entity description

This entity tells the game how to split your map into rounds, with each entity describing a single round. You may have as many of these in the map as you would like. This entity is required on multi-stage maps like Dustbowl and Goldrush.

Tip.pngTip:Use this entity's OnStart and OnEnd outputs to control spawnrooms and block off any areas of the map that aren't used in the relevant round.

Keyvalues

Name (targetname) <string>[ Edit ]
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

Start Disabled (StartDisabled) <boolean>
Stay dormant until activated (with theEnableinput).
Print Name ([todo internal name (i)]) <string>
LOCALIZED name to print on the RoundInfo panel
Priority ([todo internal name (i)]) <integer>
The priority value for this round (must be >= 0). Higher priority rounds will be picked first. If multiple rounds have the same priority value, a random selection will be used.
Control points in this round ([todo internal name (i)]) <string>
Targetnames of the control points included in this round (space delimited). Control points may belong to more than one control point round. The names of the control points (and the rounds) should all be unique.
Restrict team from winning ([todo internal name (i)]) <choices>
Prevent this team from winning by capping all the points
  • 0 : Neither
  • 1 : Both
  • 2 : Red
  • 3 : Blue

Inputs

EnableDisable:

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

Outputs

OnStart
Sent when this round is selected to be played.
OnEnd
Sent when this round is finished.
OnWonByTeam1
Sent when RED wins this round.
OnWonByTeam2
Sent when BLUE wins this round.

See also