Left 4 Dead 2

Left 4 Dead 2

50 ratings
Stay Away From My Crosshair (Vscript)
   
Award
Favorite
Favorited
Unfavorite
Game Content: Scripts
Game Modes: Single Player, Co-op
File Size
Posted
Updated
136.960 KB
2 Dec, 2024 @ 2:04pm
9 Dec, 2024 @ 4:50pm
5 Change Notes ( view )

Subscribe to download
Stay Away From My Crosshair (Vscript)

In 1 collection by kurochama
Useful "Side-Dish" Mods (Especially for Bots)
46 items
Description
Just a simple mod while waiting until "Hellfire Shotgun" is done. This mod allows you to do something on a survivor who's trying to enter your crosshair suddenly. Well, as this one is hard to show with static image, I'll put a gif image here (I'm too lazy to use Crowbar for now & still want to use Workshop Manager longer):

Just as you can see on the gif image, that is "Mode 1: Forced Pushback".


& this is "Mode 2: Forced Warp"

List of available features on "stay away from crosshair.txt" cfg file:
  1. Stay Away Type: On which type of survivor this feature will be applied (bots only, players only/ all). If you choose players only or all, other survivor players can also do something for you with their crosshair, so choose wisely :D .

  2. Stay Away Mode: Which mode will be used. Mode 1= Forced Pushback. Mode 2= Forced Warp (behind the crosshair owner) + Forced Pushback.

  3. Push Away Force: How strong the pushback force is applied. Default value is 250. The value affects how fast a survivor in crosshair will be pushed back, but at the same time this might also throw the survivor away if the value is too high. Value no. 250 to below should be safe. Well, anyway, just set this value as you like :D .

  4. Crosshair Safety Range: If other survivors are in this range when they're running close to the crosshair, they'll be pushed back/ warped. Min= 1, max= no limit.

  5. Admin Only: Default value is 0. There are 2 modes except value no. 0.
    Mode 1= Admin/ host can't be pushed back/ warped, but other survivor players can still push each other when "Stay Away Type" is set to 2 or 3.
    Mode 2= Only admin/ host can push/ warp other survivors in crosshair.

So, this mod can become a solution in case if you want other survivor not to get into your crosshair while you're shooting.

NOTES:
  • This mod is only active is the survivor near the crosshair is not caught by special infected, incapacitated or hanging from the ledge. This is also not active when you use any items other than primary & secondary weapons.
  • Although this mod uses a timer fast enough to scan survivor's movement (in 0.03 second per tick), there might be a case where a survivor still can get into the crosshair, so this might not give 100% safety guarantee from friendly fire (at least this should give 90-95% instead, that's a rare case).
  • Known bugs:
    • On "Mode 1: Forced Pushback", if you stay on the lower ground & a survivor near your crosshair is on the upper ground, the survivor near your crosshair will be thrown somewhere away from your crosshair (the "Push Away Force" affects how far he'll be thrown away).
    • On "Mode 2: Forced Warp", if you stay too close in front of a wall or object & then put your crosshair at other survivor, that survivor will be warped inside the wall/ object & stuck there until you look at him again. So, this one is only good for bots, as bots can warp back to team automatically when stuck.
  • A new mode, "Mode 3: Forced Crouch/ Duck", is a prototype, as it still has some bugs. It means that it may be updated, changed, or even replaced with another better feature in the future. Feel free to tell me if you don't want this mode to be replaced with other feature someday.
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