r/tf2scripthelp • • Apr 25 '15

Answered Bind change script question from primary weapon to secondary weapon

Is it possible to make a script where the primary and alternate attacks are changed based on the weapon that is out?

I'm trying to make a script where the bindings for primary and alt attack is set for the primary weapon and when I switch to the secondary weapon the primary and alt attack bindings change to different keys.

1 Upvotes

6 comments sorted by

View all comments

Show parent comment

2

u/genemilder Scripter May 24 '15

Unfortunately your running out of ammo glitch isn't fixable due to the same stuff (no way to detect).

BTW you don't have to unbind a key before rebinding it, any bind statement of a key will simply overwrite/erase any previous definition.

Separately, we recommend against nested binds. They work but will cause issues if you aren't careful.

1

u/Snow_Monky May 24 '15

Damn, yeah I expected that. It's not big deal, but still sucks.