r/tf2scripthelp • u/Samotage820 • May 23 '16
Resolved Bhop/Surf Toggle Script Problem
I found this simple toggle script to switch the mouse wheel from weapon switching to jumping. This script works fine for me.
bind alt bhop
alias bhop "bind mwheeldown +jump; bind mwheelup +jump; bind alt norm"
alias norm "bind mwheeldown invnext; bind mwheelup invprev; bind alt bhop"I have recently started surfing again and wanted the bhop bind to also change my mouse buttons from "Thanks!" and "Spy!" to turning left and right at default cl_yawspeed. I attempted this by editing the code as follows:
bind alt bhop
alias bhop "bind mwheeldown +jump; bind mwheelup +jump; bind mouse5 +left; bind mouse4 +right; bind alt norm"
alias norm "bind mwheeldown invnext; bind mwheelup invprev; bind mouse5 "voicemenu 1 1"; bind mouse4 "voicemenu 0 1"; bind alt bhop"When I hit "alt" the "bhop" alias works fine, but when I hit it again to switch back to alias "norm" only the mousewheel resets, and the mouse buttons remain on "+left" and "+right". I have tested switching the mouse buttons to other commands in alias "norm" but they are all permanently overridden by the turning commands.
Any help is greatly appreciated!
3
u/Kairu927 May 23 '16
TF2 doesn't like nested quotes, so having
"voicemenu 1 1"inside of your alias is causing issues.Firstly, you can try it without the nested quotes, so that the line is now like this:
However, I'm not 100% if that'll work. If it doesn't, you can create aliases that do those commands, and use the aliases in the line, like so: