This article relates to the game "Team Fortress 2". Click here for more information.

King of the Hill

From Valve Developer Community
< Team Fortress 2(Redirected from KotH)
Jump to: navigation, search
English (en)한국어 (ko)Русский (ru)Translate (Translate)

King of the Hill is a gamemode in Team Fortress 2 that was initially a custom mode. As a custom mode, all parameters were encapsulated within the map itself, rather than any server plugin. It became official with the Classless update.

King of the Hill or KOTH involves one team capturing a point and trying to keep it for themselves for a certain amount of time (officially 3 minutes). The other team can capture the point and start their timer. When captured by the enemy, this does not change the time on the other team's timer - it only freezes it. The team thats timer reaches 0 first wins.

Note.pngNote:Use the koth_ prefix in map file names. These are identified by TF2.

Creating a KOTH map

Entities

In order to transform a point into a KOTH point, the following entities are needed:

The names have been noted to fit this tutorial.

Laying out a control point

Creating a Control Point is explained here

Names in this tutorial

Remember to name your entities, otherwise they cannot interact with each other and their names will appear in red when typed in. In this tutorial, we will assume that your entities will have the same names as the entity names, as no multiples of the same entity are needed for KOTH.

Transformation into KOTH

After you have your regular Capture Point setup laid out, you will have to open up the properties of your trigger_capture_area.

My Output > Target Entity Target Input Parameter Delay Only Once
Io11.png OnCapTeam1 tf_gamerules SetRedKothClockActive 0.00 No
Io11.png OnCapTeam2 tf_gamerules SetBlueKothClockActive 0.00 No

These inputs are needed because KOTH as a game rules entity doesn't have a built-in clock activation system. You can obviously set the respawn times (via the target inputs SetBlueTeamRespawnWaveTime and SetRedTeamRespawnWaveTime) as well through inputs, but these are the very basics of KOTH.

Now, open tf_logic_koth. As of now, it already includes the most basic of KOTH parameters - targetname, timer length and unlocking time. These are set to their defaults - timer length is 3 minutes (180 seconds) and unlock time is 30 seconds from round start.

Note.pngNote:The console command mp_waitingforplayers_cancel 1 will ignore the unlock time and leave the capture point unlocked. This can be repealed with the mp_restartround command.

Now, open logic_auto and insert these inputs:

My Output > Target Entity Target Input Parameter Delay
Io11.png OnMapSpawn tf_gamerules SetBlueTeamGoalString #koth_setup_goal 0.00
Io11.png OnMapSpawn tf_gamerules SetRedTeamGoalString #koth_setup_goal 0.00
Io11.png OnMapSpawn tf_gamerules SetRedTeamRespawnWaveTime 6 0.00
Io11.png OnMapSpawn tf_gamerules SetBlueTeamRespawnWaveTime 6 0.00

External links