Dod control point master: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
 
(30 intermediate revisions by 8 users not shown)
Line 1: Line 1:
{{wrongtitle|title=dod_control_point_master}}
{{tabsBar|main=gs|base=dod_control_point_master}}
 
{{CD|CControlPointMaster|file1=dod_control_point_master}}
==Entity Description==
{{this is a|logical entity|name=dod_control_point_master|game=Day of Defeat: Source}}


This entity controls and checks the status of the control points on the map to determine a winner. Also allows for a timed map to be set up that allows for one team or the other to win after a certain amount of time. This will even show a timer countdown box in the upper left corner of the HUD.
This entity controls and checks the status of the control points on the map to determine a winner. Also allows for a timed map to be set up that allows for one team or the other to win after a certain amount of time. This will even show a timer countdown box in the upper left corner of the HUD.


==Keyvalues==
==Key Values==
* {{kv enabledisable}}
{{KV|Use round timer?|intn=cpm_use_timer|boolean|Enables round time limit (spawning a {{ent|dod_round_timer}}).}}
* '''point_give_delay_time'''
{{KV|Round timer length in seconds|intn=cpm_timer_length|int|}}
: <integer> Time between point gives ( seconds )
{{KV|Which team wins when timer expires|intn=cpm_timer_team|integer choices|}}
 
:{| class=standard-table
* '''cpm_group'''
: <string> Group Name
 
* '''cpm_use_timer'''
: {{boolean}} Use round timer?
 
* '''cpm_timer_team'''
: <choices> Which team wins when timer expires
:{|
! Literal Value || Description
! Literal Value || Description
|-
| 0 || No
|-
|-
| 2 || Allies
| 2 || Allies
Line 27: Line 16:
| 3 || Axis
| 3 || Axis
|}
|}
:{{note|Setting this to any other value will result in the round not ending when the timer expires; stalemates are not permitted.}}
{{KV StartDisabled}}


==Inputs ==
== Inputs ==
* {{i enabledisable}}
{{I EnableDisable}}
* '''RoundInit'''
{{I|AddTimerSeconds|param=int|Add seconds to the duration of the round timer}}
: Re initializes the round
{{I|RoundInit|nofgd=1|Re initializes the round, resetting all [[dod_control_point|control points]] and [[dod_capture_area|capture zones]]. Does not actually restart the round, so the [[dod_round_timer]] and any [[dod_bomb_target|bomb targets]] are not reset.<br>This is fired automatically by game code at the start of each round, so it generally doesn't need to be used manually.}}
 
* '''RoundStart'''
: Restarts the round
 
* '''SetTeam <choices>'''
: Used for the filtering of this entity
:{|
! Literal Value || Description
|-
| 0 || No
|-
| 2 || Allies
|-
| 3 || Axis
|}


==Outputs==
==Outputs==
{{O|OnAlliesWin|ac-is-self=1|Fires when the Allies win.}}
{{O|OnAxisWin|ac-is-self=1|Fires when the Axis win.}}
:{{Note|Should not be used for victory music, as it will be overlaid over the vanilla music. The default [[soundscripts]] should be overridden using {{file|maps/<mapname>_sounds|txt}} instead.}}


* '''OnAlliesWin'''
== See also ==
: trigger when the allies win... used for playing victory songs if you wish.
* {{ent|dod_control_point}}
 
* '''OnAxisWin'''
: trigger when the axis win... used for playing victory songs if you wish.
 
[[Category:Day of Defeat: Source Entities]]
[[Category:Entities]]
[[Category:Level Design]]

Latest revision as of 15:58, 3 June 2025

C++ Class hierarchy
CControlPointMaster
CBaseEntity
C++ dod_control_point_master

dod_control_point_master is a logical entity available in Day of Defeat: Source Day of Defeat: Source.

This entity controls and checks the status of the control points on the map to determine a winner. Also allows for a timed map to be set up that allows for one team or the other to win after a certain amount of time. This will even show a timer countdown box in the upper left corner of the HUD.

Key Values

Use round timer? (cpm_use_timer) <boolean>
Enables round time limit (spawning a dod_round_timer).
Round timer length in seconds (cpm_timer_length) <integer>
Which team wins when timer expires (cpm_timer_team) <integer choices>
Literal Value Description
2 Allies
3 Axis
Note.pngNote:Setting this to any other value will result in the round not ending when the timer expires; stalemates are not permitted.
Start Disabled (StartDisabled) <boolean>
Stay dormant until activated (with theEnableinput).

Inputs

EnableDisable:

Enable / Disable
Enable/disable this entity from performing its task. It might also disappear from view.
AddTimerSeconds <integerRedirectInput/integer>
Add seconds to the duration of the round timer
RoundInit  !FGD
Re initializes the round, resetting all control points and capture zones. Does not actually restart the round, so the dod_round_timer and any bomb targets are not reset.
This is fired automatically by game code at the start of each round, so it generally doesn't need to be used manually.

Outputs

OnAlliesWin
!activator = !caller = this entity
Fires when the Allies win.
OnAxisWin
!activator = !caller = this entity
Fires when the Axis win.
Note.pngNote:Should not be used for victory music, as it will be overlaid over the vanilla music. The default soundscripts should be overridden using 🖿maps/<mapname>_sounds.txt instead.

See also