Tf logic koth: Difference between revisions
m (→Inputs: Substituted IO templates) |
|||
| (20 intermediate revisions by 5 users not shown) | |||
| Line 1: | Line 1: | ||
{{ | {{LanguageBar}} | ||
{{TF2 topicon|docs}} | |||
== | {{this is a|point entity|name=tf_logic_koth|game=Team Fortress 2}} | ||
== Entity description == | |||
Activates [[Team Fortress 2/King of the Hill|King of the Hill]] mode. | |||
This entity displays a red timer and a blue timer in the [[HUD]]. | |||
==Keyvalues== | Another way to activate the timers is using the input {{Code|SetRedKothClockActive}} or {{Code|SetBlueKothClockActive}} from {{Ent|tf_gamerules}}. | ||
== zz_red/blue_koth_timer Entities == | |||
The '''{{Code|preset=1|zz_red_koth_timer}}''' and '''{{Code|preset=1|zz_blue_koth_timer}}''' entities are two {{Ent|team_round_timer}} entities created by the {{Ent|tf_logic_koth}} when the map is loaded that control each team's individual timer. | |||
You can work with these timers in-editor, as they work fundamentally the same as regular {{Ent|team_round_timer|alt = team_round_timers}}, although they have a few changes internally to work on [[Team Fortress 2/King of the Hill|KOTH]] maps. | |||
Having any [[I/O]] with these entities will work, though {{Hammer|1}} will say that the [[I/O]] is broken. | |||
[[File:Logic relay pausing red koth timer.png|thumb|An example of a {{Ent|logic_relay}} pausing the red timer on a [[Team Fortress 2/King of the Hill|KOTH]] map.]] | |||
{{Note|Naming a {{Ent|team_round_timer}} entity in Hammer and adding [[I/O]] inputs will not function or alter the timers in-game. The engine seems to ignore them if they are added in-editor and will still add the entities on map load.}} | |||
=== Outputs into the timers === | |||
You can have outputs from other entities going into the timers. | |||
'''For example''': | |||
Having a {{Ent|logic_relay}} pause the red round timer would look like this in the [[I/O]] panel. | |||
<p style="margin:1.3em 0"><code> {{Code|OnTrigger}} -> {{Code|zz_red_koth_timer}} -> {{Code|Pause}} </code></p> | |||
So whenever that {{Ent|logic_relay}} is triggered, it will pause red's timer. | |||
This will '''ONLY''' effect red's timer. Blue's will remain unaffected. | |||
[[File:Logic relay using AddOutput on blue koth timer.png|thumb|A {{Ent|logic_relay}} using AddOutput on {{Code|preset=1|zz_blue_koth_timer}} to display a {{Ent|game_text}} whenever there is 1 second remaining on blue's timer.]] | |||
=== Outputs from the timers === | |||
You can also get outputs from the timers by using {{Code|[[AddOutput]]}} in-editor with the timers. | |||
'''For example''': | |||
A {{Ent|logic_relay}} when triggered adds the output {{Code|On1SecRemain}} on the {{Code|preset=1|zz_blue_koth_timer}} entity that displays a message from a {{Ent|game_text}} entity. | |||
<p style="margin:1.3em 0"><code> {{Code|OnTrigger}} -> {{Code|zz_blue_koth_timer}} -> {{Code|AddOutput}} -> {{Code|On1SecRemain game_message:Display::0:1}} </code></p> | |||
This will make it so whenever our first {{Ent|logic_relay}} is triggered, a message will be displayed on screen when {{Code|preset=1|zz_blue_koth_timer}} reaches 1 second remaining. | |||
This will '''ONLY''' happen with blue's timer. Nothing will happen if red's timer reaches 1 second remaining. | |||
== Keyvalues == | |||
{{KV Targetname}} | {{KV Targetname}} | ||
{{KV|Timer Length|integer|Total duration (in seconds) either team must hold the point to win.}} | {{KV|Timer Length|integer|Total duration (in seconds) either team must hold the point to win.}} {{Note|Most maps use 180 (3 minutes), but Ghost Fort uses 420 (7 minutes).}} | ||
{{KV|Control Point Delay|integer|Time (in seconds) before the control point unlocks.}} | {{KV|Control Point Delay|integer|Time (in seconds) before the control point unlocks.}} | ||
==Inputs== | == Inputs == | ||
{{I Targetname}} | {{I Targetname}} | ||
{{ | {{I|SetRedTimer}} | ||
{{ | {{I|SetBlueTimer}} | ||
{{ | {{I|AddRedTimer}} | ||
{{ | {{I|AddBlueTimer}} | ||
==Outputs== | |||
== Outputs == | |||
{{O Targetname}} | {{O Targetname}} | ||
Latest revision as of 23:04, 20 April 2025
tf_logic_koth is a point entity available in
Team Fortress 2.
Entity description
Activates King of the Hill mode.
This entity displays a red timer and a blue timer in the HUD.
Another way to activate the timers is using the input SetRedKothClockActive or SetBlueKothClockActive from tf_gamerules.
zz_red/blue_koth_timer Entities
The zz_red_koth_timer and zz_blue_koth_timer entities are two team_round_timer entities created by the tf_logic_koth when the map is loaded that control each team's individual timer.
You can work with these timers in-editor, as they work fundamentally the same as regular team_round_timers, although they have a few changes internally to work on KOTH maps.
Having any I/O with these entities will work, though Hammer will say that the I/O is broken.
Outputs into the timers
You can have outputs from other entities going into the timers.
For example:
Having a logic_relay pause the red round timer would look like this in the I/O panel.
OnTrigger -> zz_red_koth_timer -> Pause
So whenever that logic_relay is triggered, it will pause red's timer.
This will ONLY effect red's timer. Blue's will remain unaffected.
zz_blue_koth_timer to display a game_text whenever there is 1 second remaining on blue's timer.
Outputs from the timers
You can also get outputs from the timers by using AddOutput in-editor with the timers.
For example:
A logic_relay when triggered adds the output On1SecRemain on the zz_blue_koth_timer entity that displays a message from a game_text entity.
OnTrigger -> zz_blue_koth_timer -> AddOutput -> On1SecRemain game_message:Display::0:1
This will make it so whenever our first logic_relay is triggered, a message will be displayed on screen when zz_blue_koth_timer reaches 1 second remaining.
This will ONLY happen with blue's timer. Nothing will happen if red's timer reaches 1 second remaining.
Keyvalues
- Name (targetname) <string>[ Edit ]
- The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g.
parentnameortarget).
Also displayed in Hammer's 2D views and Entity Report.See also: Generic Keyvalues, Inputs and Outputs available to all entities
- Timer Length ([todo internal name (i)]) <integer>
- Total duration (in seconds) either team must hold the point to win.
Note:Most maps use 180 (3 minutes), but Ghost Fort uses 420 (7 minutes).
- Control Point Delay ([todo internal name (i)]) <integer>
- Time (in seconds) before the control point unlocks.
Inputs
- SetRedTimer
- SetBlueTimer
- AddRedTimer
- AddBlueTimer