Tf logic koth: Difference between revisions
Line 40: | Line 40: | ||
A logic_relay when triggered adds the output <code>On1SecRemain</code> on the zz_blue_koth_timer entity that displays a message from a [[game_text]] entity. | A logic_relay when triggered adds the output <code>On1SecRemain</code> on the zz_blue_koth_timer entity that displays a message from a [[game_text]] entity. | ||
<code>OnTrigger -> zz_blue_koth_timer -> AddOutput -> On1SecRemain game_message:Display::0:1</code> | <code>OnTrigger -> zz_blue_koth_timer -> AddOutput -> On1SecRemain game_message:Display::0:1</code> | ||
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 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. |
Revision as of 23:57, 4 June 2023
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 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.
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.
Keyvalues
- Name (targetname) <string>[ Edit ]
- The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g.
parentname
ortarget
).
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