r/Tf2Scripts • u/BoundlessScience • Oct 30 '22
Script Vaccinator Quick-Uber script
I'm pretty new to code in general so there might be cleaner ways to implement this, but I've designed a script based on the macros I've seen from Theory-Y Studios. Instead of changing the resistance on button press, it changes resistance, pops an uber and changes back to default. It is rather unusual, but it removes the need to rebind anything and feels nice to use.
//Script designed in accordance to Theory-Y Studios macros settings
//MOUSE4 explosive uber and back. MOUSE5 fire uber and back. Circumvents need for rebinding
bind MOUSE4 +explosive;
bind MOUSE5 +fire;
//Cycle Script copied from https://www.reddit.com/r/tf2/comments/42hcbn/vaccinator_medics_ive_written_a_script_that_lets/
alias cycle_once "+reload; wait 5; -reload"
alias cycle_twice "+reload; wait 5; -reload; wait 5; +reload; wait 5; -reload"
//Bullet to explo, uber, explo to fire to bullet
alias +explosive "cycle_once; +attack2"
alias -explosive "cycle_twice; -attack2"
//bullet to explo to fire, uber, fire to bullet
alias +fire "cycle_twice; +attack2"
alias -fire "cycle_once; -attack2"For anyone who is also new to scripts: This needs to be placed inside the medic.cfg file. Another file name seems to not work.
Feel free you give your opinions or improvement ideas.
View all comments
Show parent comment
1
u/BoundlessScience Jun 04 '23
These fall under the same issue. All secondary attacks are triggered via the command attack2. Meaning that script should also trigger for example the zoom on the sniper rifle, the shield bash, etc. A very janky work-around would be to always enter that script into the console when you want to play vaccinator, then afterwards restore your keybinds to default. Although that's out of the picture should you use any other keybinds.
I fear the best soluition I can come up with is to bind it to special keys only for the vacc, so you dont accidentaly trigger it with other classes/weapons.