Left 4 Dead 2

Left 4 Dead 2

98 ratings
[VScript] Witches Spawn Off of the Main Path
   
Award
Favorite
Favorited
Unfavorite
Game Content: Scripts
File Size
Posted
7.827 KB
2 Jul @ 3:07pm
1 Change Note ( view )

Subscribe to download
[VScript] Witches Spawn Off of the Main Path

Description
It is as the title says. The days of being forced to kill the infected you're meant to avoid are over.

Whenever Yours Truly spawns, the script will automatically relocate her to a new, more suitable spawn location if she's too close to the main path.

The main path is identified through navigation mesh attributes. If a nav area containing the attribute "ESCAPE_ROUTE" (meaning this nav area is part of the fastest possible route from start to the end of the level, thus the main path) is found, that's how the spawned witch is considered too close to it.

The nav mesh's main path may differ from the path you take, depending on the map you're playing. If a witch is spawned in what you consider to be the main path, it means there is another route that the game considers to be the main one.

SETTINGS
Here's the fun part: I included multiple options that you can configure based on your needs. Do you think the witch still spawns too close to the main path still? You can change that. Want the witch to be as far as she can be from your eyes? You can do that too, I guess.

Settings are located in left4dead2/ems/witches_spawn_off_path/settings.txt. Here's an overview of each of them:
https://gtm.steamproxy.vip/workshop/filedetails/discussion/3514969443/598531176428236316/
Popular Discussions View All (1)
0
2 Jul @ 3:12pm
PINNED: Settings
Witch
27 Comments
macarøni 28 Sep @ 4:43pm 
thanks witch
Friendly Neighborhood Combine 30 Aug @ 10:11am 
@Nawis you're a monster
Nawis 30 Aug @ 6:59am 
nah, very often the witch is put in a place easily avoidable, however if u put her sometimes in front of saferoom, rescue doors or narrw paths etc.
Witch  [author] 30 Aug @ 6:53am 
@Nawis vanilla is already like that
Nawis 30 Aug @ 6:33am 
i was there was a script that did the reverse, make witches spawn more in path
I STAPLE TAPEWORMS ON MY 18 Aug @ 12:55pm 
could you add a check to make sure the witch doesnt spawn in fire or a kill trigger
Cheetos 11 Jul @ 12:04am 
This is just incredible
R󠀡F 9 Jul @ 12:00pm 
@Witch I use this in some of my scripts to check manual spawns.

local IsSpawner = false;
if(Entities.FindByClassnameWithin(null, "commentary_zombie_spawner", witch.GetOrigin(), 50.0))
IsSpawner = true;
else if(Entities.FindByClassnameWithin(null, "info_zombie_spawn", witch.GetOrigin(), 50.0))
IsSpawner = true;
if(!IsSpawner etc etc)

Chat formatting be damned.
Witch  [author] 9 Jul @ 11:49am 
@RF I don't know if it's possible to track what's spawning them.
R󠀡F 9 Jul @ 11:29am 
Can you add an setting to ignore any witch spawns manually spawned by the map and only count the director spawned witches? This could cause issues with customs that require you to kill the witch to progress.