Left 4 Dead 2

Left 4 Dead 2

View Stats:
Qdude Sep 17, 2017 @ 1:13am
Never ending panic event?
I want to make an event where you trigger an alarm and have to run to the safe room with a never ending horde of zombies. I got the door triggering down, its just how do I make the PanicEvent never stop?
< >
Showing 1-6 of 6 comments
Grobi Sep 17, 2017 @ 7:40am 
You need to create a .nut file in the scripts/vscripts folder.
Name it yourmapsname_panic and paste this template into it. Feel free to play around with the values too.


DirectorOptions <-
{
// This turns off tanks and witches (when true).
ProhibitBosses = false

//LockTempo = true

// Sets the time between mob spawns. Mobs can only spawn when the pacing is in the BUILD_UP state.
MobSpawnMinTime = 1
MobSpawnMaxTime = 1

// How many zombies are in each mob.
MobMinSize = 30
MobMaxSize = 30
MobMaxPending = 30

// Modifies the length of the SUSTAIN_PEAK and RELAX states to shorten the time between mob spawns.
SustainPeakMinTime = 5
SustainPeakMaxTime = 10
IntensityRelaxThreshold = 0.99
RelaxMinInterval = 1
RelaxMaxInterval = 5
RelaxMaxFlowTravel = 50

//Special infected options
SpecialRespawnInterval = 1.0
SmokerLimit = 2
JockeyLimit = 0
BoomerLimit = 0
HunterLimit = 2
ChargerLimit = 1

// Valid spawn locations
PreferredMobDirection = SPAWN_NO_PREFERENCE
ZombieSpawnRange = 2000
}

Director.ResetMobTimer() // Sets the mob spawn timer to 0.
Director.PlayMegaMobWarningSounds() // Plays the incoming mob sound effect.


The script has to be started with an output. E.g. on the alarm door:
OnFullyOpen -> name_of_your_info_director -> BeginScript -> yourmapsname_panic

Optional: To stop the script add an output to the Saferoom Door:
OnClosed -> name_of_your_info_director -> EndScript
Qdude Sep 17, 2017 @ 8:58am 
One question with the triggering the .nut file, do I put the script name in "With a parameter override of"?
Grobi Sep 17, 2017 @ 9:02am 
lol - I had to look for myself before answering...
YES!
Last edited by Grobi; Sep 17, 2017 @ 9:03am
Qdude Sep 17, 2017 @ 9:11am 
Originally posted by Grobi:
lol - I had to look for myself before answering...
YES!
And one more question. How could I put my custom .nut file into pak01_dir?
Grobi Sep 17, 2017 @ 9:34am 
pak01_dir.vpk is the main vpk file of the game - you have to create your very own vpk (with all your changes and maps and stuff in it).

I guess you've build a map. If so, do the following:

Create a folder "my campaign" (name of your choice) and create the folders "maps", "missions" and "scripts/vscripts" in it. You'd have to add a "materials" and "sound" folder if you use custom textures and sounds.

Here is the official explanation on how to create a vpk:
https://developer.valvesoftware.com/wiki/L4D2_Campaign_Add-on_Tutorial

You could also use GCFScape to have a look how other mappers set up the folder structure: http://nemesis.thewavelength.net/?p=26

The mission.txt and the addoninfo.txt are important elements too. They may appear confusing on the first use. Again I recommend to use GCFScape to get a better understanding.
Last edited by Grobi; Sep 17, 2017 @ 9:35am
Qdude Sep 17, 2017 @ 9:44am 
Originally posted by Grobi:
pak01_dir.vpk is the main vpk file of the game - you have to create your very own vpk (with all your changes and maps and stuff in it).

I guess you've build a map. If so, do the following:

Create a folder "my campaign" (name of your choice) and create the folders "maps", "missions" and "scripts/vscripts" in it. You'd have to add a "materials" and "sound" folder if you use custom textures and sounds.

Here is the official explanation on how to create a vpk:
https://developer.valvesoftware.com/wiki/L4D2_Campaign_Add-on_Tutorial

You could also use GCFScape to have a look how other mappers set up the folder structure: http://nemesis.thewavelength.net/?p=26

The mission.txt and the addoninfo.txt are important elements too. They may appear confusing on the first use. Again I recommend to use GCFScape to get a better understanding.
Thanks.
< >
Showing 1-6 of 6 comments
Per page: 1530 50

Date Posted: Sep 17, 2017 @ 1:13am
Posts: 6