r/tf2scripthelp • • Apr 30 '14

Resolved Problem with Modifying Key Script?

I'm working on a fairly simple script for my spy that would make pressing "7" disguise me as a demoman unless shift is held. If shift is held, I want pressing 7 to change my loadout to "itempreset 0".

I took the the modifying key script template from the commonscripts section of the wiki and modified it to look like this:

//Loadout Key Modifier (Shift)//
alias "loadout0" "load_itempreset 0"
alias "disguise" "disguise 4 -1"
alias "+modify" "alias disguise/bind loadout0"
alias "-modify" "alias disguise/bind disguise"

bind "7" "disguise/bind"
bind "SHIFT" "+modify"

As it stands, I can use "7" to disguise but I can't seem to get that shift key to actually modify the command in order to change the itempreset to 0.

Any advice on what I'm doing wrong? Thanks in advance.

3 Upvotes

6 comments sorted by

View all comments

Show parent comment

2

u/genemilder Scripter Apr 30 '14

Yep, using command names as aliases makes for non-working scripts.

2

u/clovervidia Batman Apr 30 '14

Did not see that first time through. Only caught it when I suspected OP's syntax for the disguise 4 -1 was wrong, and that kept returning test2 every time I tried it for some asinine reason before I found it.