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

Царь горы

From Valve Developer Community
< Ru‎ | Team Fortress 2
Revision as of 04:07, 22 August 2024 by Nesciuse (talk | contribs) (obsolete language category)
Jump to navigation Jump to search
English (en)한국어 (ko)Русский (ru)Translate (Translate)


Режим «Царь горы» впервые появился как пользовательская модификация, однако его работа обеспечивалась не серверной надстройкой, а логикой, записанной в карты. Позже он был добавлен в игру официально с Бесклассовым обновлением.

«Царь горы» (King of the Hill или KOTH) — это режим игры, в котором команды соревнуются в удержании точки в течение некоторого времени (трех минут в официальных картах). При захвате точки включается обратный отсчет времени для команды, а когда точка переходит к противнику, он останавливается и начинает идти время второй команды. Побеждает та команда, счетчик которой первым достигает нуля.

Note.pngПримечание:Игра распознает карты этого режима по префиксу «koth_» в имени файла.

Создание карты в режиме «Царь горы»

Note.pngПримечание:Здесь и далее я буду употреблять понятие «сущность(en)» (entity(en)).

Сущности

Чтобы превратить обыкновенную контрольную точку в подходящую для «Царя горы», понадобятся следующие сущности:

Warning icon.png
This article has been marked as a candidate for speedy deletion for the following reason:
Use {{Flag|en}} instead.
If you object to this decision, then please discuss why here (If you make a discussion section also create this redirect page). If this page doesn't meet the criteria for speedy deletion, then please remove this notice, but do not remove it from pages that you have created yourself
Administrators / Moderators - Remember to check if anything links here and the page history before deleting.

logic_auto(en)

Warning icon.png
This article has been marked as a candidate for speedy deletion for the following reason:
Use {{Flag|en}} instead.
If you object to this decision, then please discuss why here (If you make a discussion section also create this redirect page). If this page doesn't meet the criteria for speedy deletion, then please remove this notice, but do not remove it from pages that you have created yourself
Administrators / Moderators - Remember to check if anything links here and the page history before deleting.

trigger_capture_area(en)

Warning icon.png
This article has been marked as a candidate for speedy deletion for the following reason:
Use {{Flag|en}} instead.
If you object to this decision, then please discuss why here (If you make a discussion section also create this redirect page). If this page doesn't meet the criteria for speedy deletion, then please remove this notice, but do not remove it from pages that you have created yourself
Administrators / Moderators - Remember to check if anything links here and the page history before deleting.

tf_logic_koth(en)

Не забывайте называть сущности, иначе будет невозможно обеспечить их взаимодействие, а их имена будут показаны красным. Я буду называть сущности именем их типа, потому что для «Царя горы» нужно лишь по одной сущности каждого типа.

Размещение контрольной точки

Существует отдельная статья(en) с подробным описанием создания контрольной точки.

Программирование механики

После размещения контрольной точки откройте свойства вашей 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

Обрабатывать эти события необходимо, потому что в игре нет автоматического механизма запуска счетчиков времени «Царя горы». Также, например, можно менять время возрождения для команд после захвата точки по входам (target inputs) SetBlueTeamRespawnWaveTime и SetRedTeamRespawnWaveTime.

Следом нужно настроить tf_logic_koth. Откройте ее свойства. Эта сущность задает основные параметры игрового режима: время удержания и время с начала раунда до открытия точки для захвата. Их значения выставлены по умолчанию: соответственно на три минуты и на 30 секунд.

В сущность logic_auto добавьте следующие входы (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