Tf gamerules: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
(Updated with data from tf-abs.fgd)
Line 1: Line 1:
{{wrongtitle|title=tf_gamerules}}
{{tf2 point|tf_gamerules}}
{{Tf2 point}}


==Entity Description==
==Entity description==
This is an entity automatically spawned in [[Team Fortress 2]].
Proxy entity for TF Gamerules. It is spawned automatically in every map.
 
==Keyvalues==
{{KV Targetname}}
{{KV|Hud Type|choices|Override the HUD type clients should display.}}
:* 0 : Default
:* 1 : CTF HUD
:* 2 : CP HUD
:* 3 : Payload HUD
{{KV|CTF Overtime|boolean|Allow Overtime for CTF maps.}}


==Inputs==
==Inputs==
*'''SetBlueTeamGoalString'''
{{I Targetname}}
:<string> [[Localized String]]/text for blue team's goal
{{IO|SetRedTeamRespawnWaveTime|Set the RED team's respawn wave time|param=float}}
*'''SetRedTeamGoalString'''
{{IO|SetBlueTeamRespawnWaveTime|Set the BLU team's respawn wave time|param=float}}
:<string> [[Localized String]]/text for red team's goal
{{IO|AddRedTeamRespawnWaveTime|Add to the RED team's respawn wave time|param=float}}
*'''SetBlueTeamRole'''
{{IO|AddBlueTeamRespawnWaveTime|Add to the BLU team's respawn wave time|param=float}}
:<choices>
{{IO|SetRedTeamGoalString|Set the RED team's goal string to show in the hud|param=string}}
:{| class=standard-table
{{IO|SetBlueTeamGoalString|Set the BLU team's goal string to show in the hud|param=string}}
! Literal Value || Description
{{IO|SetRedTeamRole|Set RED team role, 0{{=}}none, 1{{=}}defenders, 2{{=}}attackers|param=integer}}
|-
{{IO|SetBlueTeamRole|Set BLU team role, 0{{=}}none, 1{{=}}defenders, 2{{=}}attackers|param=integer}}
| 1 || Defenders
{{IO|SetRequiredObserverTarget|Sets the given entity (by name) to be the required observer target for all spectators. Must be cleared to allow spectators to cycle through targets normally again.|param=string}}
|-
{{IO|AddRedTeamScore|Add to the RED team score (can be a negative number)|param=integer}}
| 2 || Attackers
{{IO|AddBlueTeamScore|Add to the BLU team score (can be a negative number)|param=integer}}
|}
{{IO|SetStalemateOnTimelimit|Determines whether mp_timelimit can end the match in the middle of a round.|param=bool}}
*'''SetRedTeamRole'''
{{IO|SetRedKothClockActive|Set the RED team clock active for KOTH maps.}}
:<choices>
{{IO|SetBlueKothClockActive|Set the BLU team clock active for KOTH maps.}}
:{| class=standard-table
{{IO|SetCTFCaptureBonusTime|Set the length of crit bonus time (in seconds) for CTF captures.|param=integer}}
! Literal Value || Description
|-
| 1 || Defenders
|-
| 2 || Attackers
|}
*'''SetBlueTeamRespawnWaveTime'''
:<float>
*'''SetRedTeamRespawnWaveTime'''
:<float>
*'''AddBlueTeamRespawnWaveTime'''
:<float>
*'''AddRedTeamRespawnWaveTime'''
:<float>


[[Category:Team Fortress 2 Entities]]
==Outputs==
{{O Targetname}}
{{IO|OnWonByTeam1|Sent when RED wins the round.}}
{{IO|OnWonByTeam2|Sent when BLU wins the round.}}
{{IO|Team1PlayersChanged|Sent when RED team player count changes, due to a player joining or leaving the team.|param=integer}}
{{IO|Team2PlayersChanged|Sent when BLUE team player count changes, due to a player joining or leaving the team.|param=integer}}

Revision as of 22:20, 9 May 2011

Team Fortress 2 tf_gamerules is a point entity available in Team Fortress 2 Team Fortress 2.

Entity description

Proxy entity for TF Gamerules. It is spawned automatically in every map.

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

Hud Type ([todo internal name (i)]) <choices>
Override the HUD type clients should display.
  • 0 : Default
  • 1 : CTF HUD
  • 2 : CP HUD
  • 3 : Payload HUD
CTF Overtime ([todo internal name (i)]) <boolean>
Allow Overtime for CTF maps.

Inputs

SetRedTeamRespawnWaveTime <floatRedirectInput/float>
Set the RED team's respawn wave time
SetBlueTeamRespawnWaveTime <floatRedirectInput/float>
Set the BLU team's respawn wave time
AddRedTeamRespawnWaveTime <floatRedirectInput/float>
Add to the RED team's respawn wave time
AddBlueTeamRespawnWaveTime <floatRedirectInput/float>
Add to the BLU team's respawn wave time
SetRedTeamGoalString <stringRedirectInput/string>
Set the RED team's goal string to show in the hud
SetBlueTeamGoalString <stringRedirectInput/string>
Set the BLU team's goal string to show in the hud
SetRedTeamRole <integerRedirectInput/integer>
Set RED team role, 0=none, 1=defenders, 2=attackers
SetBlueTeamRole <integerRedirectInput/integer>
Set BLU team role, 0=none, 1=defenders, 2=attackers
SetRequiredObserverTarget <stringRedirectInput/string>
Sets the given entity (by name) to be the required observer target for all spectators. Must be cleared to allow spectators to cycle through targets normally again.
AddRedTeamScore <integerRedirectInput/integer>
Add to the RED team score (can be a negative number)
AddBlueTeamScore <integerRedirectInput/integer>
Add to the BLU team score (can be a negative number)
SetStalemateOnTimelimit <booleanRedirectInput/boolean>
Determines whether mp_timelimit can end the match in the middle of a round.
SetRedKothClockActive
Set the RED team clock active for KOTH maps.
SetBlueKothClockActive
Set the BLU team clock active for KOTH maps.
SetCTFCaptureBonusTime <integerRedirectInput/integer>
Set the length of crit bonus time (in seconds) for CTF captures.

Outputs

OnWonByTeam1
Sent when RED wins the round.
OnWonByTeam2
Sent when BLU wins the round.
Team1PlayersChanged <integerRedirectInput/integer>
Sent when RED team player count changes, due to a player joining or leaving the team.
Team2PlayersChanged <integerRedirectInput/integer>
Sent when BLUE team player count changes, due to a player joining or leaving the team.