Left 4 Dead 2

Left 4 Dead 2

Not enough ratings
how to make your crosshair appear only when you walk or crouch
By MusicTron3000
make your crosshair appear visible, only when you hold shift or ctrl. like in that Alone mod mutation
   
Award
Favorite
Favorited
Unfavorite
wat to do
you'll need to write some alias and bind console commands. I suggest writing these in your autoexec.cfg file, so they automatically get written each time you load into the game.



alias +nocross "crosshair 1; +speed"
alias -nocross "crosshair 0; -speed"
alias +nocrossduck "crosshair 1; +duck"
alias -nocrossduck "crosshair 0; -duck"

bind shift +nocross
bind ctrl +nocrossduck





das it. if you'd like to know how to undo it, look for the second section.





if anybody doesn't know how to edit autoexec.cfg, and wants to;

1) locate your game's local files' cfg folder: "steamapps\common\Left 4 Dead 2\left4dead2\cfg"


2) find autoexec.cfg (or make it), and open it with a text editor, like notepad. and just copypaste these commands somewhere, and save.


one way to make the file... is to copypaste any cfg file. remove everything written in it, so it doesn't execute any other unneeded commands. and rename it to "autoexec"



explanation to how the commands work, if anybody ever needs it?

"alias" makes a new command, that you can use. it can be any name you want not just "+nocross". like "+example".
but it's got to have the "+" and "-" signs for it to work.
why alias? it's to make one command, to be able to do multiple commands at once. if you have a better way to do this pls tell.

+speed is walking (why is it +speed and not +walk idk).

+duck is self explanatory, crouching.

"bind" binds the command to your shift and ctrl keys. I think most know this anyway.





(pls note, I don't know much about custom addon crosshairs as of right now, so I don't really know if it will work for those. it will work for the vanilla crosshair. if "crosshair 1,0" command works, it should work.)
to undo all of this
1) remove what you have written in autoexec.cfg, if you have.
2) type in console;

crosshair 1
bind shift +speed
bind ctrl +duck



or you can assign keys through in-game keybind settings.
actually maybe writing these in autoexec would be better? you choose.
where the idea came from
ever played this?


https://gtm.steamproxy.vip/sharedfiles/filedetails/?id=2908453385&searchtext=alone

genuinely a very neat addon made by Deadlock.
technically has the same thing as here. if you'd like to have your crosshair like this for some reason. I do for sure, finally can see things better. it actually can improve aiming, probably.

since you don't really need to aim when you run much, cause your recoil will be like crazy.
4 Comments
MusicTron3000  [author] 27 Jul @ 11:47am 
hmm... that sounds like a nice crosshair, good for you :Yuyuko:. personally, I prefer vanilla crosshair, to have more precision and feeling. but if I had to pick any crosshair outside of the game, I'd pick the one that is like a dynamic circle with no middle, probably.

that sounds like my settings in reverse. I use Q for scoping, and default mouse2 for shoving. I'm kind of fine with defaults in l4d2, even if I have to pair it with different games. (except the default bind of pressing middle mouse button for scoping screw that shi), so maybe try some default controls, see if you like them more? idk aehgh.
and ya you're right, bindtoggle might not work here specifically. still, a useful command to know in the future, so thank you.
Rico Heart 27 Jul @ 10:24am 
Thanks!

I'm not sure bindtoggle could be used to make your code simpler.

I ended up aiming with a transparent, outlined ReShade overlay that is empty in the middle and big enough to need center-estimation. I like this.

So I'm not even using any crosshair that the game provides.

Right click is best for shove, I agree.

Because of other games I'm using the front side button for shove, and right click is scoping (which I almost never use of course). But I'm on the verge of giving in and going back to the defaults.
MusicTron3000  [author] 27 Jul @ 9:25am 
yooo, neat. glad that my guide was of any help.

though I didn't know a command "bindtoggle" existed, now that I'm reading your guide, nicely made btw. maybe could've made my thing simpler, but it is as it is.

ya, source games don't have a thing for mouse2 ironsights (which I'm kinda fine with, since I played mostly source engine games anyway), and I'm used to mouse2 being the shove, to change it to anything. so to each their own.
good idea anyway, maybe there can be some commands, to make a script, that simulates the ability to look down ironsights? like change the viewmodel, enable walking... idk. I'm content with mouse2 doing something else except aiming. so I won't look into this that much.

there's also an idea to have mouse1 as shooting, and having the crosshair appear at the same time, but I'm not into that personally, but it is possible to make. also nice idea with having mwheelup and mwheeldown for scope.
Rico Heart 27 Jul @ 1:42am 
Nice tight idea, gives a reason to use walking in coop and single player.

I've learned from you too, thanks.

Parallel to you I made a guide about holding the right mouse button to have a crosshair: https://gtm.steamproxy.vip/sharedfiles/filedetails/?id=3534969341

In that I used the Windows program called AutoHotKey, but thanks to your guide I figured out how to set up mouse2. So AHK isn't necessary, which is great!

I prefer being able to crouch and walk without the crosshair appearing, and using the right mouse button for aiming (got used to it in other games). MWHEELUP and MWHEELDOWN for scope.

Although in this game shoving away enemies is so often used, mouse2 is the best for it. I use a side button for now.