Left 4 Dead 2

Left 4 Dead 2

Stay Away From My Crosshair (Vscript)
53 Comments
Hикoлaй Aлeкceeвич 20 Jul @ 11:41pm 
Funny, but not usable
CaptPatrick01 4 Jul @ 2:32pm 
Having used mode 3 for quite a while the only bugs I noticed were the bots t-bagging even when aimed well into their hitbox, and an interference with Left 4 Bots and Left 4 Bots 2 where they won't be able to uncrouch themselves. i.e, it acts like a toggle switch.
kurochama  [author] 22 May @ 2:13pm 
@(^^^) Xeno , you can just manually change "Stay Away Mode" to 3 then, as the settings follow the cfg file, & the cfg file will be loaded in the beginning of each chapter.
(^^^) Xeno 22 May @ 1:54pm 
Could you make the default setting to mode 3? Mostly are positive about that
SHiFT_DeL3TE 28 Apr @ 6:01pm 
Also should make it where this doesn't do anything if the survivors haven't left the saferoom yet.
SHiFT_DeL3TE 28 Apr @ 5:54pm 
Mode 3 is probably the best one, however it would be a lot better if there was a thing where if you have your crosshair on a survivor for long enough, they will do whatever they are supposed to do. Like crouching. So that way if you move your mouse quickly it won't make survivors crouch or anything.
kouga 24 Apr @ 9:16pm 
ive been using forced crouch because sometimes the forced pushback mode can kill the bots if you push them into a corner lol.
Cileebra 24 Mar @ 12:39am 
Самый лучший мод, спасибо :steamhappy:
o_-KILLJOY-_o 28 Jan @ 7:02am 
I how did i miss this, this is exactly what i needed :steamhappy:
____ 13 Jan @ 5:15pm 
This is a very interesting script, and I can’t believe you were able to do that with L4D2
Izuki 23 Dec, 2024 @ 7:36pm 
Mmm i see Thanks~
kurochama  [author] 23 Dec, 2024 @ 5:09am 
@Izuki , if you're on the lower ground & bots are the upper ground, they'll be thrown backward. You can reduce the value of "Push Away Force" to 50 or below to prevent bots from getting pushed back too far.
Izuki 23 Dec, 2024 @ 4:06am 
for some reason they can float
Doc903 22 Dec, 2024 @ 10:27am 
I know, it was just an idea for a funny.
kurochama  [author] 22 Dec, 2024 @ 9:14am 
@Doc903 , making bots stumble away from crosshair should also be possible, but that will also make bots vulnerable to zombie's attack during stumbling.
Doc903 22 Dec, 2024 @ 9:11am 
Hm... what if mode 4 would make a survivor bot stumble back away from your crosshair? Like they're dodging being flagged by your gun barrel, lol.
Doc903 22 Dec, 2024 @ 8:44am 
I'll try that.
kurochama  [author] 21 Dec, 2024 @ 11:40pm 
@Doc903 , have you tried to play singleplayer & then exit to main menu? Or try to reload a gun during play.
Doc903 21 Dec, 2024 @ 10:32pm 
For some reason, I don't have the .txt file in my ems folder.
kurochama  [author] 15 Dec, 2024 @ 11:32pm 
@Ellis , thank you :steamhappy: . I'm glad that you like this mod.
Ellis 15 Dec, 2024 @ 8:32pm 
WOW This would have to be the BEST MOD ever put on the WORKSHOP in MY OPINION.
THIS IS MY NEW GREATEST MOD I HAVE HAD THE PLEASURE TO USE.
To the Author I can not Thank You enough for creating This AWESOME mod. I FEEL LIKE IT IS THE BEST CHRISTMAS GIFT EVER. May you be Blessed for the Joy you have given.
Ellis 15 Dec, 2024 @ 5:30pm 
Thank you very much for answering my question. I appreciate it greatly.:steamthumbsup:
kurochama  [author] 15 Dec, 2024 @ 5:25pm 
@Ellis , the pushback isn't active if player is switching to health kit or any items other than primary & secondary weapons. So, you should be able to approach bots when holding health kit in your hands.
Ellis 15 Dec, 2024 @ 4:03pm 
Would I be able to bind a key to turn this Mod On or Off.
If the player wanted to approach a bot in a safe room for example ?
Or when trying use health kit on a bot without pushing them?
Legoshi's Wife 10 Dec, 2024 @ 10:12pm 
@kurochama Awesome stuff, thanks!
kurochama  [author] 9 Dec, 2024 @ 5:31pm 
@Doc903 , that should also be possible, by checking if there's common infected near the destroyed objects. I think Geebanger can make this for you if he wants, as he ever made mods with similar features like "Gunshots attract infected" & another one that attracts horde.
Doc903 9 Dec, 2024 @ 5:14pm 
Or would it just be good to assign the general "break_breakable" event to anything broken near infected? I feel like even just breaking a crate could be a deadly mistake.
Doc903 9 Dec, 2024 @ 5:13pm 
Right, that would be badass.
kurochama  [author] 9 Dec, 2024 @ 5:09pm 
@Doc903 , this is also possible. If you play "Pick A Gnome" custom campaign, you'll see this feature quite often, in map 1 as it's one of features there.
Doc903 9 Dec, 2024 @ 5:04pm 
Oooo, wonder if breaking windows could lure local infected, then?
kurochama  [author] 9 Dec, 2024 @ 4:59pm 
@Melon , I added "Admin Only" feature on the new update. I added 2 modes on it instead, so people can have more options to choose.

@Salty Oreos , I added "crouch timers" on mode 3. Now other survivors can stand up automatically in 5 seconds after they're forced to crouch in the crosshair. Actually I wanted to add a feature to adjust the forced crouch duration, but maybe later if there are more requests to freely adjust it via cfg file.

@Doc903 , this can be discussed further on "Modding/ Mapping" section on discussion forum later. But this probably can be made via "break_breakable" event function, with several options, like:
1. Only spawn horde with certain chance.
2. Only attract zombies nearby to random survivors.
3. Same as no. 2 but zombies are attracted to the survivor blowing up the propane tank etc)
4. Combination of no. 1 & no. 2/ 3.
Doc903 9 Dec, 2024 @ 2:03pm 
I know we discussed it previously, but I think I would just rather request it from someone who is more seasoned with scripting, whereas I sit here fumbling with .cfg files.

There are so many explosions that occur in game, I think it would be cool if a mod made it where propane tanks alone(since oxygen tanks work like a pipe bomb, they can be excluded), have a 50% chance to summon either a horde, or all surrounding infected when exploded.
Salty Oreos 9 Dec, 2024 @ 1:33am 
Sounds great!
Sometimes you just wanna play some solo but hate accidentally doming your bots with a shotgun blast on higher difficulties and wish they knew to duck when firing
kurochama  [author] 9 Dec, 2024 @ 12:28am 
@Melon , thanks. Actually I'm very touched to see that some people noticed my records on gamemaps too, especially on "Merciless Bots" :steamhappy: . Feedbacks are necessary for fixing bugs & updating mods to be better, so I'm always all ears for feedbacks. & currently I'm still working on the scripts to add "Admin Only" feature, & some timers to cancel "Forced Crouch" on mode 3. I'll update it soon after finishing testing several times. Probably if it's not tomorrow, it's the day after tomorrow.
Legoshi's Wife 8 Dec, 2024 @ 9:18pm 
The first one; only "admin" can push other survivors. Again; I love how you take feedback from comments. From that one suggestion you took on Merciless Bots on gamemaps to this, you're a bloody legend. :)
kurochama  [author] 8 Dec, 2024 @ 2:26pm 
@Salty Oreos , yes, there's such bug when they keep crouching, but you can make them stand up by pointing crosshair at them with medkit, pills, throwable or anything other than primary & secondary weapons. Probably that's also a good idea to set a timer about how long they'll keep crouching. I'll try to add a timer first to see how that will work.

@Melon , do you want only admin that's allowed to do the pushback? Or admin's immunity of pushback? If it's admin's immunity, then other survivors can still push each other but they can't push the server owner/ admin. Either one of them should be possible to make.
Legoshi's Wife 8 Dec, 2024 @ 9:59am 
Is it possible to make it so only the owner of the local server can push players around? I can friendly fire fellow survivors but they can't, as to prevent assholes from ruining the game. That would help with accidentally shooting them sometimes, especially when I'm shooting a Witch or Tank and they just go in-front of me.
Salty Oreos 8 Dec, 2024 @ 6:40am 
The crouch mode is very promising but I'm noticing instances where they do not stop crouching after you look away from bots.
Also being able to decrease how long they stay crouched would be nice as well
kurochama  [author] 5 Dec, 2024 @ 9:22pm 
@CaptPatrick01 , you can now adjust the range via "Crosshair Safety Range" I just recently added.
kurochama  [author] 4 Dec, 2024 @ 1:06pm 
@CaptPatrick01 , probably possible. I think I can add another new feature about the range later on the next update.
CaptPatrick01 4 Dec, 2024 @ 11:59am 
I wonder if a configurable range limit could be added so that the pushback would only take effect within a certain radius of the player.
kurochama  [author] 3 Dec, 2024 @ 6:42pm 
@Marketable Pliers , well, that can be done in several ways, I think, like:
1. Forced Pushback: when bots are in range of tank's punch, they'll be pushed back.
2. Forced Warp: Same as above, but they'll warp.
3. Forced Adrenaline: Bots will be boosted with adrenaline speed boost when they're in range of tank's punch.
4. Forced Retreat: This can use either "BOT_CMD_MOVE" or "BOT_CMD_RETREAT" bot commands, but I think some bot mods have already used this.

You can try some bot mods first, as they use more realistic ways to make bots retreat from tank.
something something house 3 Dec, 2024 @ 6:13pm 
@Marketable Pliers do you have left 4 bots? If so, it's a feature for both of the version 1 and 2
Market Pluh 3 Dec, 2024 @ 5:51pm 
bots avoid tank
kurochama  [author] 3 Dec, 2024 @ 5:31pm 
@Marketable Pliers , what tank? Tank has this one: https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=3173873262
Or you can also use "Super Tanks" by Everice, for many variant tanks with different abilities.
Market Pluh 3 Dec, 2024 @ 4:15pm 
can u do tank next
kurochama  [author] 3 Dec, 2024 @ 11:39am 
@Melon , looks like you've found another use for mode 1 :steamhappy:
Legoshi's Wife 3 Dec, 2024 @ 1:16am 
Cool I can push people into Witches now.
something something house 3 Dec, 2024 @ 12:28am 
Yrah im been in a hurry as of late and didn't look in the ems folder
kurochama  [author] 2 Dec, 2024 @ 10:15pm 
@Xeno :] , I added "Mode 3: Forced Crouch". You can try it. But somehow it seems that the other modes are still safer than this, because bots still take a crouching animation for less than 1 second when forced to crouch, instead of instantly crouching, so there's still a chance to get shot.