Left 4 Dead 2

Left 4 Dead 2

79 ratings
Bots Avoid Witch (Vscript)
   
Award
Favorite
Favorited
Unfavorite
Infected: Witch
Game Content: Scripts
Game Modes: Single Player, Co-op
File Size
Posted
Updated
7.277 KB
18 Dec, 2024 @ 5:09am
1 Jun @ 1:02am
5 Change Notes ( view )

Subscribe to download
Bots Avoid Witch (Vscript)

In 1 collection by kurochama
Useful "Side-Dish" Mods (Especially for Bots)
46 items
Description
A: "Bots are crazy. They just get closer to a witch without fear."
B: "Bots are bad when they meet a witch."
C: "Can anybody do something about these insane bots? They keep touching the witch."
Me: "Ok enough of all those complaints. I guess I'll make one mod for that."

& here it is, a mod to make bots avoid witch:


Well this one actually started from some experiments with "AddThinkToEnt" function. From the description, it said like it only allows one think function for one entity. & suddenly a crazy idea popped up in my mind like:
"What if witch gets this think function, & pushes away any survivor bots close to her?"

& after some tests, I made it :D . Man, I think modding can also be this fun... :D .

For now, this mod has no cfg file. So, just subscribe & it's ready to use. I'll add a cfg file later if there are more requests for it.


BONUS: Custom Cvars
CUSTOM CVAR
EFFECTS
kuro_bots_avoid_jockey
- Range between bots & jockey until bots are pushed back
- Example: kuro_bots_avoid_jockey 250
- Setting it to 0 will disable it.
kuro_bots_avoid_tank
- Range between bots & tank until bots are pushed back
- Example: kuro_bots_avoid_tank 250
- Setting it to 0 will disable it.




A note for modders, who are interested in exploring the potentials of "AddThinkToEnt" function, feel free to look at the vscript file inside the mod. The scripts there are made in a very simple way that many people should know how it works simply by looking at them. & "AddThinkToEnt" can be used for many other features, like for example, if you want witch to get angry instantly when a survivor gets too close to her, add "AddThinkToEnt" to the witch, & then trigger "TakeDamage" with only 1 damage on a witch, & register the attacker to the survivor getting too close to her. So, I hope that this mod can give some new ideas for other modders, to make use of "AddThinkToEnt" too on other fun things :D .



So, now, you won't have to worry about bots disturbing a witch.



NOTES:
  • A video preview will be added later.
  • A known bug (more to a beneficial bug for bots): The pushback effect on bots lasts as long as witch is still alive no matter if she's still wandering/ sitting or she's chasing a survivor. So, to put it simply, bots get "Witch Evasion" ability with this mod (as long as they don't get cornered to a wall, witch most likely can't touch them as they get pushed back faster than witch's running speed). This may or may not be removed later, depending on whether there are some requests to "nerf" or even remove it or not.
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.