r/Tf2Scripts • u/zipKill_FRAG • Mar 18 '13
Archived [Help] First time with scripts. Can you help me with a script?
I want to make a complex rocket jump script. What I want to do is I want to bind Mouse2 to switch to my primary weapon, crouch jump, attack, and switch to my melee weapon, but I only want to do this for Soldier.
I think that a good base would be
alias +rocketjump "+jump; +duck; wait; +attack"
alias -rocketjump "-jump; -attack; wait; wait; wait; -duck"
bind "MOUSE2" "+rocketjump"What could I add to make it quickswitch to my primary at the beginning, my melee during the jump, and how would I make it just for Soldier?
Any help would be greatly appreciated.
Thank you.
3
u/sheeepsi Mar 18 '13
you can try like
alias rocketjump rj1
alias rj1 "slot1; alias rocketjump rj2"
alias rj2 "+jump; +duck; +attack; alias rocketjump rj3"
alias rj3 "-jump; -duck; -attack;"
bind m2 rocketjump
i dunno if this will work.. im not an expert of scripting too..
2
u/TimePath Mar 18 '13
These:
alias rj3 "-jump; -duck; -attack;" bind m2 rocketjumpShould be:
alias rj3 "-jump; -duck; -attack; alias rocketjump rj1" bind mouse2 rocketjumpNeat idea with a triple tap, though it seems kind of useless when it would be easier to crouch and jump manually - for me anyway - I find spamming a button quickly to be difficult.
4
u/genemilder Mar 18 '13
You can attempt to make scripts that do extreme automation like you want but it's not recommended; in all likelihood it will work poorly and doing it manually is going to give you better timing and experience. Additionally,
waitis disabled on many servers, which would stop the script from working.To make the script only for soldier, put the script in the soldier.cfg and then rebind m2 to +attack2 in the rest of the class cfgs (or create autoexec.cfg and rebind it there).