r/Tf2Scripts • u/CrawBunny • Feb 12 '25
Question Need help with a spy bind
Enable HLS to view with audio, or disable this notification
3
Upvotes
r/Tf2Scripts • u/CrawBunny • Feb 12 '25
Enable HLS to view with audio, or disable this notification
2
u/CrawBunny Feb 12 '25
// Spy Cloak Toggle Bind Using +attack2 (Only for Spy)
alias "spy_cloak_on" "cl_drawviewmodel 0; +attack2; alias spy_toggle_cloak spy_cloak_off"
alias "spy_cloak_off" "cl_drawviewmodel 1; -attack2; alias spy_toggle_cloak spy_cloak_on"
alias "spy_toggle_cloak" "spy_cloak_on"
bind "MOUSE2" "spy_toggle_cloak"
This is the bind. Basically, when I go invisible (pressing M2), I want my viewmodel to be disabled. The script does work first going invisible, but when I go out of invis, the viewmodel is enabled first, then the invis happen with another M2. This is pretty annoying.
2
u/[deleted] Feb 13 '25
The reason you had to press m2 twice is because is because spy_cloak_on/off also toggle attack2 on/off.
You want it to function more like a normal m2 press, this script should do that, hope it helps
alias +spytogglecloak "+attack2;toggle r_drawviewmodel";
alias -spytogglecloak "-attack2";
bind mouse2 "+spytogglecloak";