Team round timer: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 10: Line 10:
* {{kv enabledisable}}
* {{kv enabledisable}}
* '''timer_length'''
* '''timer_length'''
: <int> Initial timer length. (in seconds)
: <integer> Initial timer length. (in seconds)
* '''max_length'''
* '''max_length'''
: <int> Maximum timer length (0 = no max). This value is used to ensure the timer never goes above this value when SetTime and AddTime are used. (in seconds)
: <integer> Maximum timer length (0 = no max). This value is used to ensure the timer never goes above this value when SetTime and AddTime are used. (in seconds)
* '''start_paused'''
* '''start_paused'''
: <boolean> Should the timer start paused? (will need to send a Resume input to start the timer if this is set).
: {{boolean}} Should the timer start paused? (will need to send a Resume input to start the timer if this is set).
* '''setup_length'''
* '''setup_length'''
: <int> Length of setup time before the round begins and the timer starts to countdown the normal time. (0 = no setup time)  Setup time is run at the beginning of every round before the normal time begins. (in seconds)
: <integer> Length of setup time before the round begins and the timer starts to countdown the normal time. (0 = no setup time)  Setup time is run at the beginning of every round before the normal time begins. (in seconds)
* '''reset_time'''
* '''reset_time'''
: <boolean> Reset the timer time after a round restart.  This is not the setup time, but the normal round time.
: {{boolean}} Reset the timer time after a round restart.  This is not the setup time, but the normal round time.
* '''auto_countdown'''
* '''auto_countdown'''
: <boolean> Let the timer automatically count down the end of a round.
: {{boolean}} Let the timer automatically count down the end of a round.
* '''show_in_hud'''
* '''show_in_hud'''
: <boolean> Note: You can only show one timer in the HUD at a time.
: {{boolean}} Note: You can only show one timer in the HUD at a time.


==Inputs==
==Inputs==
Line 32: Line 32:
: Resume the timer.
: Resume the timer.
* '''SetTime'''
* '''SetTime'''
: <int> Set the timer to this value (in seconds).
: <integer> Set the timer to this value (in seconds).
* '''AddTime'''
* '''AddTime'''
: <int> Add time to the timer (in seconds). Added time cannot excede the max timer length.
: <integer> Add time to the timer (in seconds). Added time cannot excede the max timer length.
* '''AddTeamTime'''
* '''AddTeamTime'''
: <string> Input takes a string (space delimited) with the team number and the time to be added (in seconds) because of the team (2 for red, 3 for blue, and 0 for no team...but you could just use AddTime for that). Added time cannot excede the max timer length. Example: 2 600 (adds 10 minutes because of team red)
: <string> Input takes a string (space delimited) with the team number and the time to be added (in seconds) because of the team (2 for red, 3 for blue, and 0 for no team...but you could just use AddTime for that). Added time cannot excede the max timer length. Example: 2 600 (adds 10 minutes because of team red)
Line 40: Line 40:
: Restart the timer.
: Restart the timer.
* '''ShowInHUD'''
* '''ShowInHUD'''
: <int> Show this timer in the HUD (0 no, 1 yes).
: <integer> Show this timer in the HUD (0 no, 1 yes).
* '''SetMaxTime'''
* '''SetMaxTime'''
: <int> Set the max timer length to this value (in seconds). The timer's time will never excede this value.
: <integer> Set the max timer length to this value (in seconds). The timer's time will never excede this value.
* '''AutoCountdown'''
* '''AutoCountdown'''
: <int> Turn off/on the auto countdown feature (0 no, 1 yes).
: <integer> Turn off/on the auto countdown feature (0 no, 1 yes).
* '''SetSetupTime'''
* '''SetSetupTime'''
: <int> Set the setup time length to this value (in seconds).
: <integer> Set the setup time length to this value (in seconds).


==Outputs==
==Outputs==

Revision as of 21:29, 6 October 2007

Template:Wrongtitle

Entity Description

Round Timer. Timer starts paused by default.

Availability

This point entity is exclusive to Team Fortress 2.

Keyvalues

<integer> Initial timer length. (in seconds)
  • max_length
<integer> Maximum timer length (0 = no max). This value is used to ensure the timer never goes above this value when SetTime and AddTime are used. (in seconds)
  • start_paused
<boolean> Should the timer start paused? (will need to send a Resume input to start the timer if this is set).
  • setup_length
<integer> Length of setup time before the round begins and the timer starts to countdown the normal time. (0 = no setup time) Setup time is run at the beginning of every round before the normal time begins. (in seconds)
  • reset_time
<boolean> Reset the timer time after a round restart. This is not the setup time, but the normal round time.
  • auto_countdown
<boolean> Let the timer automatically count down the end of a round.
  • show_in_hud
<boolean> Note: You can only show one timer in the HUD at a time.

Inputs

Pause the timer.
  • Resume
Resume the timer.
  • SetTime
<integer> Set the timer to this value (in seconds).
  • AddTime
<integer> Add time to the timer (in seconds). Added time cannot excede the max timer length.
  • AddTeamTime
<string> Input takes a string (space delimited) with the team number and the time to be added (in seconds) because of the team (2 for red, 3 for blue, and 0 for no team...but you could just use AddTime for that). Added time cannot excede the max timer length. Example: 2 600 (adds 10 minutes because of team red)
  • Restart
Restart the timer.
  • ShowInHUD
<integer> Show this timer in the HUD (0 no, 1 yes).
  • SetMaxTime
<integer> Set the max timer length to this value (in seconds). The timer's time will never excede this value.
  • AutoCountdown
<integer> Turn off/on the auto countdown feature (0 no, 1 yes).
  • SetSetupTime
<integer> Set the setup time length to this value (in seconds).

Outputs

Sent when 5 minutes remain.
  • On4MinRemain
Sent when 4 minutes remain.
  • On3MinRemain
Sent when 3 minutes remain.
  • On2MinRemain
Sent when 2 minutes remain.
  • On1MinRemain
Sent when 1 minutes remain.
  • On30SecRemain
Sent when 30 seconds remain.
  • On10SecRemain
Sent when 10 seconds remain.
  • On5SecRemain
Sent when 5 seconds remain.
  • On4SecRemain
Sent when 4 seconds remain.
  • On3SecRemain
Sent when 3 seconds remain.
  • On2SecRemain
Sent when 2 seconds remain.
  • On1SecRemain
Sent when 1 second remains.
  • OnRoundStart
Sent when the round starts.
  • OnFinished
Sent when the timer is finished.
  • OnSetupStart
Sent when the setup time begins.
  • OnSetupFinished
Sent when the setup time is finished.