Left 4 Dead 2

Left 4 Dead 2

View Stats:
Need help with zombies not spawning
In my map, I'm trying to make the common infected (maybe SI too) spawn exclusively in these vents. They should also spawn at any distance from the survivors. All floors are marked with NO_MOBS and EMPTY, with the vents being marked OBSCURED and NOT_CLERABLE.

The issue I'm having is that infected are not spawning beyond a certain distance. I want them to spawn wherever the survivors stand. When out of a certain range from the director's "valid" mob spawn range, zombies will not spawn and the console will spam with this error:
MOB SPAWN ERROR: ANYWHERE = Empty spawn area set

When walking within the valid range, those error message will stop, and the zombies will spawn in the vents and come running down. The occasional "Spot blocked (x y z)" error will appear, though I'm not too worried about that just yet.

Within my director script, I've tried specifying the following director parameters:
ZombieSpawnDistance = 10000
PreferredMobDirection = SPAWN_ANYWHERE (as well as SPAWN_ABOVE_SURVIVORS, SPAWN_NO_PREFERENCE, and SPAWN_LARGE_VOLUMN)
Here's the rest of the script: https://pastebin.com/uMmx0dvv

In addition to the above, I've tried several nav_analyzes after making little changes to be safe. Doing this and the above yielded no results.

Here's a 1 minute video of it, to give you a better idea of the distances and what not:
https://www.youtube.com/watch?v=SJw8T4iJqUo&feature=youtu.be

You'll notice how when I first start the crescendo, just SI appear. Which is whatever I guess. Then I'll walk closer to where the two vents are located and the common infected will come pouring in. When they feel like it at least. I will then no_clip inside of the vents to give a general idea of their size.

Now with all of that being said, what should I do to make the mobs spawn regardless of distance between survivor and valid mob spawns? Suggestions?
< >
Showing 1-6 of 6 comments
AlwaysToast Jun 1, 2017 @ 6:18pm 
I believe
ZombieSpawnDistance = 10000
is the minimum spawn distance, not the maximum. So try cutting that down to like 100-500. I could be wrong.

You can also add to the mission file (under the specific map level) launch convars
convar { "z_spawn_safety_range" 100 "z_finale_spawn_safety_range" 100 //only works if the map is a finale "z_finale_spawn_tank_safety_range" 100 //only works if the map is a finale }

Which will allow infected to spawn closer than normal to the survivors.

Modify the safety range numbers to suit the size of the map.
Deep Thunder Jun 3, 2017 @ 8:00am 
I took all of your suggestions and somewhat same results. Here's what I did:

-Edited ZombieSpawnDistance to be 10000 or 100 after all changes were made
-Added those convars to the missions file (minus the finale convars, this is a campaign with multiple maps)
-Changed PreferredMobDirection to be SPAWN_LARGE_VOLUME
-Added RelaxMaxFlowTravel = 50
-Marked the nav with Battlefield and did a nav_analyze

It seems adding the Battlefield nav change was significant enough that the SPECIALS column in director_debug said "not spawning - in battlefield with panic event cleared". In addition, the mob timer was counting towards negative values. To rectify this, I appropriately added a "ForcePanicEvent" input to the director from within Hammer and recompiled.

After the recompile, the "forced" panic event spawned the mobs where I wanted them to and came running at me. However, after the panic event ended (director_debug went from PANIC MODE to NORMAL MODE), the mobs no longer spawned and the console insisted on spamming me with the "MOB SPAWN ERROR: ANYWHERE = Empty spawn area set" error.

In addition to the above, I also tried creating a scripted panic event. However, after the execution of the scripted panic event, mobs didn't spawn and the console spammed me with that error.

Given all of this information, what else should I try to get these mobs to spawn?
Deep Thunder Jun 3, 2017 @ 8:21am 
Would rather have them spawn through the director, but thanks anyway
AlwaysToast Jun 3, 2017 @ 11:11am 
If you are trying to spawn infected there duing a panic event, mark the vents as EMPTY (in addition to OBSCURED and NOT_CLEARABLE). EMPTY stops wandering infected from spawning, but doesn't stop panic event zombies, in fact panic event zombies want to spawn in locations marked Empty. The problem may be that all the EMPTY locations are labled No_Mobs, and it's looking for a EMPTY spot where it can spawn infected.

You may want to test this incrementally (just mark one section of the Vents as EMPTY and see if that area starts spawning infected like crazy). Of course all the other modified numbers may cause this to only work when you're at certain ranges.

You should also incrementally fiddle with ZombieSpawnDistance since you have only tried crazy extremes.
Deep Thunder Jun 3, 2017 @ 12:39pm 
I marked each vent EMPTY and omitted the other, and it doesn't seem to have any effect on the director or its preferences.

It still, however, seems the mobs will only spawn if I walk within that certain range, no matter what I set it to. Even a simple director_force_panic_event will yield the same results. I might just manually spawn the zombies after all.
Last edited by Deep Thunder; Jun 3, 2017 @ 12:54pm
AlwaysToast Jun 4, 2017 @ 12:23pm 
Ok I built a map with a hallway and a bunch of 64 unit high vents that lead to the top of the hallway and marked up and built the nav to make zombies only spawn in the vents. Got the same error spam you got. So this might help.

Common Infected can't spawn crouched. So the director doesn't want them to spawn anywhere with low ceilings (like vents). Look for a blue diagonal line on the nav squares which denote crouching. Commons can't spawn there. If your vents are all around 64 units, the director doesn't want to spawn infected in them. This may be your problem, or at least a contributing factor.

I left the vents near the hallway the same height, but increased the height to 128 units in the back of the vent area. I then rebuilt the nav in the area where I raised the ceiling, did a nav analyze, walked into a panic event trigger, flood of zombies out of the vents as desired (they spawn in the tall area, then run into the vents to get to the survivors), no more error message.

So if your vents are all short, you need to make "zombie spawn areas" in the vents that are tall enough to actually allow the zombies to spawn.
< >
Showing 1-6 of 6 comments
Per page: 1530 50

Date Posted: Jun 1, 2017 @ 5:03pm
Posts: 6