r/Tf2Scripts • u/JaffaCakes6 • Jan 01 '15
Satisfied Engie quick building script, based on a modifier key
EDIT: MANAGED TO GET BACK MY OLD CFG FILES, AND FOUND THE SCRIPT! THANK YOU VERY MUCH EVERYONE WHO HELPED OUT!
The script is as follows:
alias e1 "build 2;destroy 2"
alias e2 "build 0;destroy 0"
alias e3 "build 1;destroy 1"
alias e4 "build 3;destroy 3;"
alias +function "bind 1 e1;bind 2 e2;bind 3 e3;bind 4 e4;"
alias -function "bind 1 slot1;bind 2 slot2;bind 3 slot3;bind 4 slot4;"
bind "MOUSE5" "+function"Don't know how or why, but there we go!
So I reinstalled my TF2 yesterday, but forgot to back up my scripts. I've gotten most of them back, but I can't find (or figure out how to write) an engie script I used to have.
The script allowed me to hold down MOUSE5 and get a sentry out with 1, dispenser out with 2 etc. It didn't place the building. If a building was already up, it destroyed that building and switched to my primary. The script let me keep the original functionality of the keys 1-4, but allowed me to build when I had MOUSE5 held down.
If anyone know of this script, or knows how I'd go about making one, I'd really appreciate it :)
2
u/clovervidia Jan 01 '15
I just threw this together out of my own, very similar script:
Not sure how to go about doing that
thing you mentioned, but this should do everything else.
2
u/genemilder Jan 01 '15 edited Jan 01 '15
Here's my guess, that you want keys 1-4 to function like this:
On press (while mouse5 held): Destroys any existing corresponding building and deploys corresponding blueprint, allowing the blueprint to be rotated with mouse2 and placed with mouse1.
On release (while mouse5 held): Switches to primary, which will remove the active blueprint if no building has been placed or if a building has been placed override the switch to melee that happens after a build.
On press (mouse5 not held): Switches to the corresponding slot command
I'm also going to add code so that releasing mouse5 while any of 1-4 are held will cause identical behavior to releasing 1-4 while mouse5 is held (so that accidentally releasing mouse5 at the wrong time doesn't cause you to be left with your blueprint out).
Edit: I can make a simpler version that will always switch to primary when you release mouse5, if you're okay with that always happening. It's a lot simpler.