Multi-Stage KotH Prefab (Best 2 out of 3)

Multi-Stage KotH Prefab (Best 2 out of 3) a1

Jul 26, 2015
694
819
Multi-Stage KotH Prefab (Best 2 out of 3) - Game logic for a 3-stage koth map

Multi-Stage KotH Prefab

Includes game logic for three rounds of KotH. First team to win two rounds wins the map. Optionally, the koth logic can be removed to make a three-stage 1cp gamemode (such as cp_cloak).

How it Works

In order to make this, I had to get around an issue with allowing team_control_point_rounds to be won by either team. The game doesn't like it when finished rounds have control points that are owned by different teams. For example, if blu won the first round, and red won the second round, the game would crash as soon as red's timer hit zero. To solve this, I made it so capping stage 2's point would change the owner of stage 1's point to that same team. Additionally, there is a second hidden control point in stage 2 that is automatically capped along with the main point, but with a delay of 0.1 seconds. This is so the game has time to use SetOwner on stage 1's point in the event that capturing the main point ends the round immediately, such as when that team has overtime.

The "best 2 out of 3" functionality is done simply by having a math_counter activate a game_round_win once any team wins 2 rounds.

Issues

The game will still go into the third stage if a team wins both of the first two stages, however the round will immediately end in a victory for that team.

The announcer will not count down the seconds until the point unlocks for the second and third round (point unlock time did not work properly so I had to activate them manually).