Fortress Forever

Fortress Forever (https://forums.fortress-forever.com/index.php)
-   Tips and Tutorials (https://forums.fortress-forever.com/forumdisplay.php?f=37)
-   -   Script that treats MWheelDown/Up as regular keypress (https://forums.fortress-forever.com/showthread.php?t=16308)

pF 06-25-2008 01:20 AM

Script that treats MWheelDown/Up as regular keypress
 
I can't seem to adjust the sensitivity on my mousewheel properly, so when i try to cycle through the weapons inventory i usually miss the weapons i want to select..(mwheel bound to next/prev inventory).

Would there be a way to bind mwheeldown/up as a regular keyboard key.. so no matter how long i use the mwheel, it'd just change to the next item in inventory?

Jester 06-25-2008 01:25 AM

The thing is that it already is a regular keypress, it just hits a lot if you keep scrolling.

You could only bind 1 weapon per up/down. Like mwheelup goes to slot 3 and down goes to 2 so that no matter how many times you hit each it would just keep selected 2 or 3. Unfortunately, what you want is already implemented, you just hit it too much.

You could maybe alias each direction to go to next/prevslot and then rebind itself to do nothing then rebind again to do next/prevslot so that every inbetween click does nothing incase you hit it too much.

BTW do you use quickswitch?

squeek. 06-25-2008 01:31 AM

What if you did something like

Code:

alias "downonce" "invprev; unbind mwheeldown"
bind "mwheeldown" "downonce"

alias "uponce" "invnext; unbind mwheelup"
bind "mwheelup" "uponce"

bind "w" "+forward; bind mwheeldown downonce; bind mwheelup uponce"

Probably not be the most reliable solution, but it might work.

Jester 06-25-2008 01:34 AM

I was thinking more like:
Code:

alias switcher "+attack;wait;wait;wait;wait;wait;-attack;bind mwheelup switchup;bind mwheeldown switchdown;bind mouse1 +attack"
alias switchup "invprev;unbind mwheelup;bind mouse1 switcher"
alias switchdown "invnext;unbind mwheeldown;bind mouse1 switcher"
bind mwheelup switchup
bind mwheeldown switchdown

Only goes up or down once and unbinds those keys until you select with the mouseclick. This is if you have quickswitch off.

pF 06-25-2008 04:05 AM

Wow guys, thanks for jumping to my rescue.. the bind/unbind/bind/unbind might be a solution to get rid of the jittery weapon selection.. my mousewheel just seems a little erratic / unpredictable, so i'll have to test that solution.

fastweaponswitch is "1", like it should be :D

Jester 06-25-2008 04:08 AM

Code:

alias "downonce" "invprev; unbind mwheeldown; bind mwheelup uponce"
bind "mwheeldown" "downonce"

alias "uponce" "invnext; unbind mwheelup; bind mwheeldown downonce"
bind "mwheelup" "uponce"

bind "w" "+forward; bind mwheeldown downonce; bind mwheelup uponce"

Modified squeeks code so you can go back and forth between next and previous, this will work with fastswitch. Feel free to change the bind "w" to any key you hit a lot and remember to hit it after each switch.


All times are GMT. The time now is 03:32 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.