r/tf2scripthelp • • Jan 22 '14

Issue Need help with Script and [SM]

bind home playsound
alias playsound playsound1
alias playsound1 "sm_play @all vo/test_two.wav"
alias playsound2 "sm_play @all vo/spy_jaratehit03.wav"
bind shift +toggleState
alias +toggleState "alias playsound playsound2"
alias -toggleState "alias playsound playsound1"

I'm not really sure if you guys will be able to help with this, but I'm trying to create a script that allows multiple binds on one key, so that a different command is executed when Shift is held down. This works in essence, but when using this, SM will read the filepath as "vo\test_two.wav ", and etc, with the extra space on the end, thus rendering the script useless. I don't know why this is happening, any help would be appreciated.

2 Upvotes

5 comments sorted by

View all comments

Show parent comment

1

u/clovervidia Batman Jan 23 '14

No problem. I personally have no experience with SourceMod, so I can't offer any other suggestions or workarounds.

If you do find a solution, do come back and update your post if you could.