Left 4 Dead 2

Left 4 Dead 2

View Stats:
Deep Thunder Dec 25, 2014 @ 8:40am
Force AI director to spawn infected, regardless of anything?
I have tried numerous combinations with nav mesh attributes. To no avail, zombies refuse to spawn anywhere. Except for the tank. Is the map even that small?:
http://steamcommunity.com/sharedfiles/filedetails/?id=361216976&searchtext=

It appears that due to the structure of the map, the AI director cannot spawn anything. What can I do to force the AI director to spawn zombies so survival can function normally? I cannot change the structure of the map (except maybe add more rooms in the ceiling), as that would completely defeat the purpose of this map in general.
Last edited by Deep Thunder; Dec 25, 2014 @ 9:48am
< >
Showing 1-9 of 9 comments
Zetnus Dec 25, 2014 @ 2:58pm 
Have you tried to use nav attributes like NOT_CLEARABLE or OBSCURED? Also make sure you have all the nav attributes described here: https://developer.valvesoftware.com/wiki/Survival_Gametype_%28L4D%29
Deep Thunder Dec 25, 2014 @ 5:37pm 
Thanks for the reply Zetnus.

I do indeed have all of those attributes described in that article. I found out that by not using nav_analyze, the map would function like its supposed to. On the other hand, using nav_analzye would break the mesh completely because it would uneccsarily modify existing nav attributes. I have used OBSCURED, but not NOT_CLEARABLE.

I do appreciate your time to reply.
Zetnus Dec 26, 2014 @ 4:45am 
If it works now then that is good. It's wierd that nav_analyze should break the nav ...

In any case, it might be a good idea to add NOT_CLEARABLE to any area that you want zombies to spawn in because otherwise infected can't spawn in that area once it's been cleared.
Deep Thunder Dec 26, 2014 @ 9:10am 
Even for survival? Once an area's been cleared zombies can no longer spawn?
Zetnus Dec 26, 2014 @ 10:23am 
Hmm, I've always assumed it applies to survival, but I don't actually know that for sure.

It should be possible to test if you just take a simple map and clear the zombies from every every nav area in the map and then force a panic event and see if the director is able to spawn a horde or not.
AlwaysToast Dec 26, 2014 @ 11:06am 
All the areas of your map that the players cannot reach, but zombies can spawn in should be marked Empty. Empty just means “no wandering zombies” but will still spawn specials and hordes. Areas marked Empty are vital to spawning hordes properly, especially in non-finale maps, but it may help with your problem.

All the areas out of line of sight should also be marked Obscured. So the director knows he can spawn zombies there anytime.

Not_clearable at the very least won't hurt anything for a survival map, even if it's not needed.

Make sure you have finale/battlefield set up.

Nav_analyze really needs to be run to get your map working correctly. If it’s changing your Nav, there is a reason for it (There is something wrong in the first place).

How small is your map (in hammer units)?

There is a minium “safe spawn” distance for zombies in a finale. So if your map is less than twice that value if a survivor stands in the middle nothing will spawn.

You can change the “safe spawn” distance for zombies, to force the director to spawn things ether closer than normal or further away in a Finale. So I would assume you can do it for survival. I don’t remember how I did it (and I don’t have the files on the computer I’m on now). I’ll post how to do it later if someone doesn’t beat me to it.
AlwaysToast Dec 26, 2014 @ 1:48pm 
I wrote a custom finale, which is just a vscript with all the finale info. I took the line:
ZombieSpawnRange = 3000
From one of the valve finale scripts and changed it to:
ZombieSpawnRange = 400
I believe that is the maximum range at which zombies can spawn once the script starts. So you may not need to modify that at all.

Then in my missions file I added:
convar
{
"z_finale_spawn_safety_range" 100
"z_finale_spawn_tank_safety_range" 100
}

Which defines the minimum range at which zombies and tanks can spawn during the finale.

The cvars, with the default numbers may be what is causing your problem if your map is particularly small:
Z_spawn_range 1500
Z_spawn_safety_range 550
z_finale_spawn_safety_range 600
z_finale_spawn_tank_safety_range 600


I actually fiddled with various distances a lot (playing with z_debug 1, to see where things were spawning) until I got a combination that made me happy. As I was having problems with the zombies spawning too far away. But it was a lot of trial and error, and it is very dependent on the size of the map and where zombies can spawn. There is probably a more elegant way to do this, but this is what I figured out.
Deep Thunder Dec 26, 2014 @ 3:04pm 
This information was definitely helpful. Although how would I tell you the size of my map in hammer units?
AlwaysToast Dec 27, 2014 @ 12:10pm 
Hammer units are the units of measurement in Hammer. Every time you make a block, it should display the units for each side of the block. You can ether draw a block over in the interior space of your map in the overhead view, or change the size of the grid to a level where you can count lines and do the math.
< >
Showing 1-9 of 9 comments
Per page: 1530 50

Date Posted: Dec 25, 2014 @ 8:40am
Posts: 9