r/tf2scripthelp • • Apr 20 '24

Resolved Issues with overlapping attack commands

So I've been working on a bit of an unorthodox pyro layout, shown below:

alias "+flamethrower" "slot1; +attack; viewmodel_fov 0.1"
alias "-flamethrower" "-attack"
alias "+airblast" "slot1; +attack2; viewmodel_fov 0.1"
alias "-airblast" "-attack2"
alias "+punch" "slot2; +attack; viewmodel_fov 75"
alias "-punch" "-attack"
alias "+axe" "slot3; +attack; viewmodel_fov 75"
alias "-axe" "-attack"
bind mouse1 "+flamethrower"
bind mouse2 "+airblast"
bind mouse4 "+punch"
bind q "+axe"
bind 1 "+attack2"             

Essentially, the idea is to eliminate the need for dedicated weapon switch bindings and have them tied to my attacks directly. So, mouse1 will switch to my flamethrower and attack as soon as possible, mouse2 will switch to my flamethrower and airblast as soon as possible, mouse4 with my secondary, and q with melee. It helps make it easier to be aggressive with degreaser switch speed for how my brain works.

There's just one problem. If, for example, I am currently pressing mouse4 to fire a flare, but while the button is still pressed, I hit mouse1 to start flaming, I will switch to my primary but not fire until I let go of the button and press it again. It really throws me off when it happens. I could commit to trying to press, release, press and hold, but that defeats the purpose of not having weapon switch binds. I'm wondering if there's any more complicated scripting I could do that would help defeat this problem, or if it's just a skill issue and I need to get used to letting go of one before pressing another.

2 Upvotes

2 comments sorted by

View all comments

Show parent comment

1

u/TyaTheOlive Apr 22 '24

This is exactly what I was looking for, thanks for taking the time to throw that together.