Previous Weapon Script (solved)
#1
I've played other first person shooters where you can switch to your previous weapon by hitting Q. I have never gotten used to using the scroll wheel on my mouse and I would prefer hitting Q to hitting the numbers. Would there possibly be a script for that?
Thanks given by:
#2
Ok, previous weapon as in what? Do you mean switching back to sniper from pistol, for instance? Or switching from shotgun to carbine?

If it is in case the former, try typing this into autoexec.cfg:
bind Q [primary]
Thanks given by:
#3
Buy a new mouse! (Sarcasm)
No dude, just follow PhaNtom's recommendation
Thanks given by:
#4
By previous I mean the weapon you last used.
For example...

I go from shotgun to pistol, so my previous weapon is shotgun.
I hit Q and it switches back to shotgun, but now my previous weapon is my pistol.
Then I hit Q and go back to pistol.

So therefore its not just primary to secondary, its a two way thing.
Thanks given by:
#5
(26 Mar 13, 07:41PM)PhaNtom Wrote: Ok, previous weapon as in what? Do you mean switching back to sniper from pistol, for instance? Or switching from shotgun to carbine?

If it is in case the former, try typing this into autoexec.cfg:
bind Q [primary]

Close, but it doesn't work with just primary. Works as weapon 1, weapon 2, etc.

By default you could just press the number keys eij1298, or make a bind similar to this (This is just an example, and I'm not certain the while pressed part actually works. You could try looking this info up in the docs).
/bind q [while pressed "weapon 1";weapon 2]
Thanks given by:
#6
(26 Mar 13, 09:30PM)eij1298 Wrote: So therefore its not just primary to secondary, its a two way thing.

bind "Q" [primary;secondary]
Thanks given by:
#7
Its pretty simple to do -/bind Q [primary;secondary]

EDIT: Sorry, did not see 888's post. Will do the same thing, though reading your post change the O to a Q.
Thanks given by:
#8
(26 Mar 13, 10:12PM)888 Wrote:
(26 Mar 13, 09:30PM)eij1298 Wrote: So therefore its not just primary to secondary, its a two way thing.

bind "Q" [primary;secondary]
What if he had the knife out, changed to pistol and wanted to go back?
Thanks given by:
#9
(26 Mar 13, 10:30PM)#M|A#Wolf Wrote:
(26 Mar 13, 10:12PM)888 Wrote:
(26 Mar 13, 09:30PM)eij1298 Wrote: So therefore its not just primary to secondary, its a two way thing.

bind "Q" [primary;secondary]
What if he had the knife out, changed to pistol and wanted to go back?

bind Q [weapon (prevweapon)]
Thanks given by:
#10
Thanks 888, that's exactly what I wanted! :D
Thanks given by: