Left 4 Dead 2

Left 4 Dead 2

75 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://steamhost.cn/steamcommunity_com/workshop/filedetails/discussion/3514969443/598531176428236316/
Popular Discussions View All (1)
0
2 Jul @ 3:12pm
PINNED: Settings
Witch
21 Comments
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.
Crabby Cakes 6 Jul @ 1:28pm 
Thank god, Idk why but people love adding witches in the way on campaigns that take nearly 2 hours to complete.
Ciel 4 Jul @ 10:48pm 
estas cabronas siempre spawnean convenientemente en todo el medio y cerca de una puerta xd
千λllöut S. 4 Jul @ 11:22am 
Highly need this, better then having her in Worst Spots like the Entrance of the Safe House Entrances near the End of a Chapter
Wolfy Celemex 4 Jul @ 8:03am 
I must be cursed or something because the witch spawns by me all the time in the worst places imaginable by me X_X

This should help me out :P
LambVORTEX 3 Jul @ 10:15pm 
Now... Make her spawn at the very inconvenient of spots
(aka her spawning inside of a survivor)


/j
AL: the useless man 3 Jul @ 8:43am 
Jugst liker the Trailer!!! :steamhappy::steamhappy::steamhappy: