Forum
Part of my weapon switch cfg doesn't work - Help would be awesome!
Created 4th September 2013 @ 10:52
Add A Reply Pages: 1
A friend of mine gave me an awesome config about a year ago that allowed me to switch weapons with my mousewheel (and not just cycle uselessly through them), pressing Mouse 3 used to be my switch to melee weapons but now it doesn’t work anymore.
This is what my soldier cfg looks like http://puu.sh/4iIVF.png and my basic cfg http://puu.sh/4iIWQ.png
Help would be much appreciated!
When is your ‘basic’ cfg executed? Currently what it seems to do is unbind mouse3 as soon as you press it the first time.
Quoted from Spike Himself
When is your ‘basic’ cfg executed? Currently what it seems to do is unbind mouse3 as soon as you press it the first time.
It’s executed right away…I think http://puu.sh/4iJsr.png . How do I get rid of the unbinding? And what does that, anyway, I can’t see it :T
cycle through them ?
bind ”mwheelup” ”slot1; r_drawviewmodel 0”
bind ”mwheeldown” ”slot2; r_drawviewmodel 0”
bind ”MOUSE3” ”slot3; r_drawviewmodel 1”(this is melee)
Doesn’t that work ^
Last edited by raiku,
Quoted from accless
my basic cfg http://puu.sh/4iIWQ.png
Looks like your basic cfg has a syntax error
Currently “melee” does both “slot3” and “bind MOUSE3” (whatever that is!) and then you bind “MOUSE3” to “melee”.
Try
alias “melee” “slot3”
bind “MOUSE3” “melee”
Also in the future try to define your aliases in a seperated aliases.cfg file that is part of your autoexec so you don’t get conflicting definitions like this. Your config will also look less messy (currently the weapon switch script is apparently being executed both when you join soldier and when you load your basic config, that’s useless)
Last edited by Schmuse,
Quoted from accless
[…]
It’s executed right away…I think http://puu.sh/4iJsr.png . How do I get rid of the unbinding? And what does that, anyway, I can’t see it :T
The bit in bold unbinds it:
alias melee “slot 3; bind MOUSE3”
bind “MOUSE3” “melee”
So when you press mouse3, the melee alias is called, which in turn unbinds mouse3.
I think you should be good with just deleting the bit I put in bold above, so that line becomes:
alias melee "slot 3"
(which is still silly – why make an alias if it only does 1 thing?)
Quoted from Spike Himself
[…]
The bit in bold unbinds it:
[…]So when you press mouse3, the melee alias is called, which in turn unbinds mouse3.
I think you should be good with just deleting the bit I put in bold above, so that line becomes:
alias melee "slot 3"
(which is still silly – why make an alias if it only does 1 thing?)
bind mouse3
doesn’t actually unbind anything, it just prints out in the console what the key is bound to, if the third argument is missing. You need the unbind
command specifically to unbind something.
(which is still silly – why make an alias if it only does 1 thing?)
Because melee is bound to other keys in other configs but anyway, nothing worked :T
I think I didn’t approach this the right way. I haven’t scripted anything since the steam pipe update but I thought I moved everything to the right folders. Maybe that assumption was wrong.
EDIT: Might be a hardware thing. I can’t bind voice commands either. The mouse works fine outside of TF2 though.
EDIT2: and Mouse 3 can’t be assigned to any command in the options. Weird.
Last edited by accless,
Quoted from ondkaja
[…]
bind mouse3
doesn’t actually unbind anything, it just prints out in the console what the key is bound to, if the third argument is missing. You need theunbind
command specifically to unbind something.
Yep, you’re right. My bad. I am useless.
I found the problem! :D
It was the logitech driver overwriting the mousewheel being “Mouse3” and instead just assigning Auto Scroll as a function. I’m pretty sure someone could phrase that more adequately but it’s solved now. Thanks for your time, everyone! I wouldn’t have found this without you!
Add A Reply Pages: 1