L4D2 Level Design/Boss Prohibition

Материал из Valve Developer Community
Перейти к: навигация, поиск
English (en)Русский (ru)中文 (zh)
Править

В Left 4 Dead 2 больше не позволяет запрещать танков и ведьм на картах через файл mission.txt. Теперь это делается с помощью скрипта, который вы должны разместить в папке left4dead2/scripts/vscripts (возможно, потребуется добавить папку vscripts вручную). Добавьте следующие строки в текстовый файл:


DirectorOptions <-
{
   ProhibitBosses = true
}

Сохраните текстовый файл с расширением .nut в папке vscripts. На вашей карте разместите энтити logic_auto и добавьте аутпут. Аутпут должен быть направлен на энтити AI Director, заставляя ее исполнять скрипт с помощью команды BeginScript. В поле параметров задайте имя вашего скрипта (без расширения .nut)

Также смотрите

There are multiple ways to prohibit or control the spawning of boss infected in Left 4 Dead 2, which include mission.txt and vscripts.

Mission.txt

"coop_boss_spawning" and "versus_boss_spawning" were introduced in The Sacrifice update. Known variables include:

coop_boss_spawning and versus_boss_spawning
Variable Type Range Notes
spawn_pos_min float [0,1] Percentage flow cleared by survivors?
spawn_pos_max float [0,1]
tank_chance float [0,1]
witch_chance float [0,1]
witch_and_tank int 0/1
allow_boss_mix int 0/1
Подтвердить:Identical to witch_and_tank?

Please see List of L4D2 Missions Files (using browser text search) for full examples of their use.

Confirm.pngПодтвердить: coop_boss_spawning doesn't exist in Left 4 Dead 2? Seems to be ignored by the mission file, and not used in any official campaigns.

Vscript

Vscripts can offer more flexibility in this case. The script file should place in your left4dead2/scripts/vscripts folder (you may need to add the vscripts sub-folder yourself). A basic script would include:

DirectorOptions <-
{
   ProhibitBosses = true
}

Also available is the director option DisallowThreatType = ZOMBIE_WITCH | ZOMBIE_TANK (as seen in c8m1_apartment.nut).

Save the text file with the extension .nut in the vscripts folder.

In your map, place a logic_auto entity and add an output. Note that logic_auto is only used here as an example. The output should target the AI Director entity and make it fire the script by using the BeginScript input. In the parameter field, you set the name of your script (the .nut extension is not needed but won't cause any issues). The script will end if the director is told to load another script or if triggered by an output to EndScript.

See also

Intros

Documentations

Miscelleanous