How to Pause KotH timer?

Mr_MEME_42

L1: Registered
Aug 24, 2024
15
0
I am working on a KotH map and it's a gimmick of the map is that after a set amount of time of the point being controlled the point uncaps and switches to a new location and it has to be recaptured. I got the switching points working, but I want to have it so that after the point switches the team who controlled it's timer pauses as they no longer have control of the point anymore as it has returned to neutral.

So to make a long story short how can I make the Koth timer pause after a timer goes off?
 
Solution
tf_logic_koth creates 2 entities called zz_red_koth_timer and zz_blue_koth_timer on map load. These entities are identical to team_round_timer, so its as simple as sending the Pause input to either timer when needed.
Don't worry about hammer saying the logic is incorrect, the entities only exist when the map loads.

However AFAIK, setting the owner of a koth point to be owned by neither team should properly pause the timers. Make sure you are doing it correctly.

Radial

aa
Aug 4, 2019
166
43
tf_logic_koth creates 2 entities called zz_red_koth_timer and zz_blue_koth_timer on map load. These entities are identical to team_round_timer, so its as simple as sending the Pause input to either timer when needed.
Don't worry about hammer saying the logic is incorrect, the entities only exist when the map loads.

However AFAIK, setting the owner of a koth point to be owned by neither team should properly pause the timers. Make sure you are doing it correctly.
 
Solution

Mr_MEME_42

L1: Registered
Aug 24, 2024
15
0
tf_logic_koth creates 2 entities called zz_red_koth_timer and zz_blue_koth_timer on map load. These entities are identical to team_round_timer, so its as simple as sending the Pause input to either timer when needed.
Don't worry about hammer saying the logic is incorrect, the entities only exist when the map loads.

However AFAIK, setting the owner of a koth point to be owned by neither team should properly pause the timers. Make sure you are doing it correctly.
Thanks, I just noticed that I had an unneeded trigger on the timer that controls the switching point that reactivated Red's Koth timer I assume I put it there originally to try and reactivate the timer which isn't needed.
 

Radial

aa
Aug 4, 2019
166
43
...after a set amount of time of the point being controlled the point uncaps and switches to a new location and it has to be recaptured.
Hey, quick tip for this! the hud timer for tf_logic_cp_timer can be activated without using that entity, which would be extremely useful for this gamemode you are working on, as it would allow you to very easily have a visual timer for when the point with reset and change location.

1: whenever you want this timer to appear, run this:
Code:
|   Target Entity       | Target Input  |                                Parameter                                                           |
| tf_objective_resource | RunScriptCode | NetProps.SetPropFloatArray(self, `m_flCPTimerTimes`, Time() + TIMER LENGTH HERE, POINT INDEX HERE) |
Ignore hammer if it says the input is incorrect. tf_objective_resource only exists ingame and cannot be created in hammer, nor should you do so.
Replace POINT INDEX HERE with the index of the point you want to target, and replace TIMER LENGTH HERE with the length of the timer. I will assume a length of 1 minute and an index of 0 from now on.
2: Whenever you want the timer to stop, create a new input and replace everything after `m_flCPTimerTimes`, with -1 0, with 0 being the point index.

This must be done every time you count down to the point being reset and location-swapped. This is also purely just the visual element, all other logic must be handled manually.