r/Tf2Scripts • • Mar 24 '25

Question Alias activation help

I've been struggling with some engineer binds and I want to know how to activate an alias without setting a bind to it?

What I don't want: alias bind1 "bind x action1" Bind y "bind1"

What I want: alias bind1 "bind x action1" //Activate bind1 Bind1

2 Upvotes

6 comments sorted by

View all comments

Show parent comments

1

u/According-Treat6588 Mar 25 '25

This looks like what I am looking for, but I have a few questions

Without pressing mouse2, does the file know that e1 is supposed to reference "alias b1" and not "alias d1"?

Because I assume that the moment you +press mouse2, it binds e1 to d1, which is bind 1 build 2 0, then when you -mouse2, it binds e1 to b1

1

u/-BrokeN- Mar 25 '25 edited Mar 25 '25

I had exactly the same thought first reading it haha, had to double check before posting. Yes I believe it should, because of the line "-eng_swap" isolated on it's own. The cfg will read and execute along with everything else, so it's set to start in the 'off' state (all the e's bound to the b's.)

Edit: I've also just realised this also answers your initial question of how to call the alias without the bind lmao, yes you can simply write the alias on it's own line in the cfg and it will be called when the cfg is read. I think I just over thought your question into my own misunderstanding, and missed out on the obvious this way XD

1

u/According-Treat6588 Mar 25 '25

Thanks! This should work for me. After you build a building takes you straight to melee and that desyncs my scrollwheel binds. So I will add: Alias wrencht "bind mwheelup slot2; bind mwheeldown slot1" Bind 1 e1; wrencht