Left 4 Dead 2

Left 4 Dead 2

Bots Avoid Witch (Vscript)
21 Comments
Mr.Skeleton 5 Jul @ 4:30pm 
that's ashame. Im not asking for the witch to sit down again after being startled. Instead the stray bullets dont make her get up/aggro at all just like how it works in the wondering state with stray bullets hitting her without making her aggro. But if its not possible then oh well, I was only curious if it could even be done without plug ins or something. Thank you for replying
kurochama  [author] 5 Jul @ 2:22pm 
@Mr.Skeleton , a sitting witch is very sensitive to bullets, & once she's startled, bots will start shooting. So, even if there's s possibility to make her sit again, bots will trigger her again. So, probably it's not possible. The opposite can be done though, like making a wandering witch angry even with bot's stray bullet.
Mr.Skeleton 5 Jul @ 1:12pm 
Is it possible to make a mod that makes it so bots stray bullets dont startle the witch when they hit her as she is sitting down? Just like how it is by default when the witch is wandering. I tried looking for a mod that does that but dont see any. Possibly it isnt something that can be changed.
kurochama  [author] 7 Mar @ 3:43pm 
@Jakiy , I'm pretty sure that those features are available on Left 4 Bots 2, especially about preventing bots from reviving incapped survivor near a tank. You can try to check L4B2
Jakiy 7 Mar @ 2:04pm 
Bots avoid tank please. Bots will not revive an incap player when the tank is around unless truly safe to do so or keep the distance from the tank at all times.
Rtma Eros Paragon 20 Feb @ 4:39am 
👍
kurochama  [author] 20 Feb @ 3:07am 
@Rtma Eros Paragon , the bug should be fixed now.
kurochama  [author] 20 Feb @ 2:43am 
@Rtma Eros Paragon , oh I think I forgot to include the incapacitated state as the exception. Probably I'll fix that soon. Thanks for the report.
Rtma Eros Paragon 20 Feb @ 1:51am 
I had a bot startle a witch, got downed and got flung into the distance, it was hilarious so it is not fixed.
kurochama  [author] 23 Dec, 2024 @ 12:54am 
@Melon , the recent update should fix that bug that threw bots to the air. I tested on stairs of map 3 of Hard Rain where bots were still on the upper floor.
kurochama  [author] 22 Dec, 2024 @ 11:57am 
@Melon , I think there's also netprops for collision, but I haven't tried that yet. As for the pushback direction on sudden witch spawn, it's based on witch's location. If her location is on lower ground (fow example, on stairs) & bots are on upper ground, bots will be thrown backward. But wandering witch won't throw them too far, as only a sitting witch has special conditions that she can get annoyed faster, so when she starts to get annoyed, the "invisible barrier" gets wider, like twice the normal before she starts to calm down, so if bots are too close to her when she gets annoyed, they'll be pushed back immediately. & if witch is on the lower ground, then they'll get thrown farther than usual. Probably I can try to do something about this later, like reducing or even removing the upward velocity when witch is on the lower ground..
Legoshi's Lover 22 Dec, 2024 @ 10:47am 
Interesting. Well the effect is like in that one video "Boomer VS Witch", infected have collision and block each other's paths, making them attack each other which is fun. If a Witch runs into an infected twice she will attack them, like in versus, but in co-op infected go through each other so this type of interaction never occurs. Also this mod is hilarious; I spawned a Witch earlier and the bots started being pushed upwards into the sky and then they fell and died.
kurochama  [author] 22 Dec, 2024 @ 10:08am 
@Melon , I'm still not sure how that "z_avoidteammates" cvar works, but one thing I discovered when I made the very first version of this mod before publishing. On that version, I made the pushback worked on all survivors, & I also got pushed back by the witch like there's an invisible barrier. So, I think it should also be possible to narrow the "invisible barrier" less than melee range of each player, so they can't go through other player, & at the same time specify which players will have that "invisible barrier". However, velocity can't work on CI & witch, as only stumble effect works on them.
Legoshi's Lover 22 Dec, 2024 @ 7:44am 
Idk if you take ideas/requests but I've always thought it'd be a good addition to the game: is it possible to reproduce what "z_avoidteammates 0" does, but removing the survivor collisions, so that it essentially restores L4D1's specials interacting with each other. When that cvar is set to 0, Witches blocking the path of specials (allowing her to touch them and even change target to them), but also Tanks, Boomers and such allows them to hit each other on contact.

Like simply just "z_avoidteammates 0" with no survivor collisions could make that work.
kurochama  [author] 18 Dec, 2024 @ 9:17pm 
@Somnician , unlike players, bots have an automatic failsafe feature for ledges. This is a default L4D2 feature. & I also ever tested in No Mercy rooftop by moving a bot to the edge of building & then spawn a witch. & they kept getting pushed back to the edge, but they didn't fall or hang on the ledge. So, yes, there's failsafe on bots & they won't fall even after getting pushed back by this mod.
Somnician 18 Dec, 2024 @ 5:32pm 
is there a failsafe for ledges, so the bots don't get pushed off when trying to avoid a witch on a narrow pathway?
I STAPLE TAPEWORMS ON MY 18 Dec, 2024 @ 2:28pm 
awesome
kurochama  [author] 18 Dec, 2024 @ 12:12pm 
@Wenda , I updated the mod & fixed that bug. Now, incapacitated bots won't get pushed back.
kurochama  [author] 18 Dec, 2024 @ 9:43am 
@Melon , actually I have some thoughts about some changes too, like, whether pushback is active only before witch is startled or adding other mechanisms, as this first version is still like the basic with simple mechanisms. But your idea to disable pushback only on the bot that startles the witch is also good. Probably I'll gather more ideas first before updating the mod.

@Wenda , oh, I think I forgot to add some conditions on the pushback to stop activating when bot is incapacitated. I could imagine that the witch would be very annoyed to keep chasing incapacitated bot that keeps getting pushed back :steamhappy: . I'll fix this bug on the next update. Thanks for the info.
I STAPLE TAPEWORMS ON MY 18 Dec, 2024 @ 9:04am 
Came here to comment what melon did. Even downed bots will still get pushed away
Legoshi's Lover 18 Dec, 2024 @ 8:50am 
Love the idea, will be using this from now on. Although I think you should disable the effect on Witches that are startled (so she can catch bots) but other than that the mod is already perfect. If you want to add a CFG (or make it the default behavior for the mod), I can only think of one setting; only the targetted survivor bot won't be pushed, but the mod will push other survivor bots (so they don't get stuck in her way, which seems to happen quite often in narrow pathways like No Mercy subways or that one long hallway in chapter 2 of Dark Carnival.) This would be ideal; the Witch would be able to catch her targetted survivor bot, but also push other survivor bots out of the way so she can catch that bot. It would also help with Witches catching human players instead of her switching target to a bot due to their failure at keeping away from the Witch.