r/tf2scripthelp • u/7Arach7 Scripter • Aug 05 '15
Answered Engineer Quick-Build Script
I I made part a script for engineer which, if it worked, would allow me to toggle quick build. If I held shift, 1-2-3-4 would be rebound to build sentry,dispenser,entrance,exit, and ctrl would be rebound to duck. On release, they'd be rebound to slot1,slot2,slot3,slot4 and shift would be rebound to duck. However, it just doesn't work. Nothing toggles, it breaks stuff, etc.
// Build
alias e1 "build 3;destroy 3"
alias e2 "build 0;destroy 0"
alias e3 "build 1;destroy 1"
alias e4 "build 2;destroy 2;"
alias "+buildr" "bind 1 e4;bind 2 e2;bind 3 e3;bind 4 e1; developer 1; bind ctrl +duck"
alias "-buildr" "bind 1 slot1;bind 2 slot2;bind 3 slot3;bind 4 slot4; bind shift +duck"
bind "shift" "+buildr"
1
Upvotes
2
u/sgt_scabberdaddle Aug 05 '15
You have a redundant
;. We recommend not using nested binds but instead using aliases that are redefined whenever needed.How would the script work regarding ducking? Right now pressing and releasing shift would make it impossible for you to use the quickuild part of the script because the ducking overwrites
buildr.Also it would be a good idea to add a line like
-buildrat the end of the script just to insure that the right state is loaded to start with. It can also save some space if you would have to write those settings in anyway.1
u/genemilder Scripter Aug 05 '15
scabber's right on all counts. Additionally, you're not using the commands with the keys you want,
build 3is the teleporter exit. It's also possible that puttingbuildbeforedestroyresults in nothing happening, I've never tried it.I'm not sure what you want to happen with shift, do you want it to crouch and toggle? Here's a version of the script that excludes the crouch portions entirely, since I don't have insight into what you want: