Skip to content

Instantly share code, notes, and snippets.

@kevinvanrijn
Forked from kbrougham/Vaccinator No-Wait
Created January 25, 2016 10:09
Show Gist options
  • Select an option

  • Save kevinvanrijn/a458111a9900e2d76310 to your computer and use it in GitHub Desktop.

Select an option

Save kevinvanrijn/a458111a9900e2d76310 to your computer and use it in GitHub Desktop.
Vaccinator No-Wait Specific Toggle Script
//The gist of this script is: we have three states. Bullet selected, explosive selected, and fire selected.
//When bullet is selected, we make the 'go to bullet' button do nothing, whereas the other two advance one, and update their current state.
//This way, you can continually hit a key, which will advance state, until you hit your current desired state, and it will stop advancing.
//We always start on spawn with bullet, so we set bullet blank, as to not change resist type
alias +go_to_bullet;
alias -go_to_bullet "-reload";
//Since we start on bullet, going to explosive is one use
alias +go_to_explosive "bullet_to_explosive";
alias -go_to_explosive "-reload";
//Since we start on bullet, going to fire will first require bullet_to_explosive
alias +go_to_fire "bullet_to_explosive";
alias -go_to_fire "-reload";
alias bullet_to_explosive "+reload; alias +go_to_bullet explosive_to_fire; alias +go_to_explosive; alias +go_to_fire explosive_to_fire;"
alias explosive_to_fire "+reload; alias +go_to_bullet fire_to_bullet; alias +go_to_explosive fire_to_bullet; alias +go_to_fire;"
alias fire_to_bullet "+reload; alias +go_to_bullet; alias +go_to_explosive bullet_to_explosive; alias +go_to_fire bullet_to_explosive"
//Edit these Q, E, and F keys as your desired key for go_to_type
bind Q +go_to_bullet;
bind E +go_to_explosive;
bind F +go_to_fire;
//Unfortunately, as TF2 is incapable of logic in scripting, we need a 'reset' key for each death, or we need to manually swap to bullet at the start
//of each life in order to line yourself up with the script. I use a reset key, but you may use whatever you like.
//Note, if you name this anything other than vaccinator.cfg, you will need to change the config in this line as well.
//Remove the two slashes at the start of the next line to use a reset key.
//bind Z "exec vaccinator.cfg";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment