r/Tf2Scripts • u/tmobley03 • Aug 06 '23
Script A wait-less, spam-less, Vaccinator quick-switch script for Medic
/r/tf2/comments/15jfl3m/an_all_new_waitless_spamless_vaccinator/
8
Upvotes
r/Tf2Scripts • u/tmobley03 • Aug 06 '23
View all comments
1
u/bythepowerofscience May 08 '26 edited May 08 '26
Here's an easier-to-understand version for anyone trying to learn how this script works.
The problem that was being solved with wait is that no bind can have its
+and-called more than once on a single button press without it. For example, you can't dobind 1 "+reload; -reload; +reload; -reload"and expect it to reload twice.For the script itself, it's pretty clever: the core idea is that since there are only 3 resistances, we only have to move a maximum of two times to get to any other resistance. Since pressing and releasing a key are two different actions, we just need to wire the presses and releases differently on each bind to change to any resistance.
If we only want to move once, we make it so pressing the key moves and releasing it doesn't. If we want to move twice, pressing the key moves it once and then releasing the key moves it again.
(NOTE:
"alias <name>;"makes that alias do nothing when executed. You're aliasing it to an empty command, basically.)