r/Tf2Scripts • u/EpilepsySeizureMann • Mar 09 '24
Question am i using alias right?
bind f11 +TRrollout
alias +TRrollout "sv_pure 1; hurtme -99999999999999999999; mp_tournament 1; mp_respawnwavetime -1; mp_disable_respawn_times 1; +TROLLammo"
alias +TROLLammo bind mouse1 “+attack; impulse 101”
3
Upvotes
2
u/latetothetardy Mar 11 '24 edited Mar 11 '24
I did my best to try to remix your alias into a toggle-able bind that you can activate and deactivate by pressing F11. Let me know if this works.
This ideally will enable all your settings when activated, and then when deactivated, it'll reset everything to the default. Also, I'm not entirely sure of if you need sv_cheats 1 for this script, so try it with or without up to your discretion.
1
u/Link_x2 Mar 10 '24
The script looks fine, is there anything specific you're not sure about?
Personally, I don't like changing binds in aliases (+TROLLammo), but that only matters when you have other commands already tied to mouse1. For example, If I turn off viewmodels with mouse1 and turn them on with W, rebinding mouse1 would break that viewmodel script.
To make the script more generally compatible I would instead do something along the lines of:
Then include this my autoexec.cfg:
But yeah not a big deal, just a habit that could save you a headache later on.
2
u/[deleted] Mar 10 '24
I've looked at the TF2 source code in the past, and it turns out the alias command handles quotation marks in a very unusual way. They don't actually become part of the alias, they just decide whether the next semicolon terminates the alias command or not. This means your +TROLLammo alias is the same as
bind mouse1 +attack;impulse 101without any quotation marks. This means that running +TROLLammo binds mouse1 to +attack but not impulse 101.