Upvote Upvoted 0 Downvote Downvoted
Another way of aliasing a bind?
posted in Q/A Help
1
#1
0 Frags +
alias +key "bind f load_itempreset 0"

The command above won't work because of how tf2 handles quotations.
So instead the solution would be to execute the bind in another file. E.G

bind1.cfg

alias +key "exec bind2"

bind2.cfg

bind f "load_itempreset 0"

Feels like such a sloppy way of handling it and was wondering if there was another way of doing it without having multiple files?

Thanks in advance!

[code]alias +key "bind f load_itempreset 0"[/code]

The command above won't work because of how tf2 handles quotations.
So instead the solution would be to execute the bind in another file. E.G

[b][u]bind1.cfg[/u][/b]

[code]alias +key "exec bind2"[/code]

[b][u]bind2.cfg[/u][/b]

[code]bind f "load_itempreset 0"[/code]

Feels like such a sloppy way of handling it and was wondering if there was another way of doing it without having multiple files?

Thanks in advance!
2
#2
1 Frags +

alias preset0 "load_itempreset 0"
alias +key "bind f preset0"

Haven't tested it for this but this is the easiest way I know to get around quotations not working

edit: also I think you can leave out the + in +key
If you add a + it means you want there to be a line being executed at the start of the button press. But the game will then look for a -key to execute at the end of the press.
for example:
alias key "+attack" (this works fine because the game automatically adds the -attack at the end of the button press)
alias +key "+attack" (this will keep attacking because the game can't find a -key. you'd have to also make Alias -key "-attack")

alias preset0 "load_itempreset 0"
alias +key "bind f preset0"

Haven't tested it for this but this is the easiest way I know to get around quotations not working

edit: also I think you can leave out the + in +key
If you add a + it means you want there to be a line being executed at the start of the button press. But the game will then look for a -key to execute at the end of the press.
for example:
alias key "+attack" (this works fine because the game automatically adds the -attack at the end of the button press)
alias +key "+attack" (this will keep attacking because the game can't find a -key. you'd have to also make Alias -key "-attack")
3
#3
1 Frags +
Tobalias key "+attack" (this works fine because the game automatically adds the -attack at the end of the button press)

no, it doesn't add the -attack, unless you meant to bind the key, not alias it

[quote=Tob]
alias key "+attack" (this works fine because the game automatically adds the -attack at the end of the button press)
[/quote]

no, it doesn't add the -attack, unless you meant to bind the key, not alias it
4
#4
1 Frags +
Tobalias preset0 "load_itempreset 0"
alias +key "bind f preset0"

Haven't tested it for this but this is the easiest way I know to get around quotations not working

edit: also I think you can leave out the + in +key
If you add a + it means you want there to be a line being executed at the start of the button press. But the game will then look for a -key to execute at the end of the press.
for example:
alias key "+attack" (this works fine because the game automatically adds the -attack at the end of the button press)
alias +key "+attack" (this will keep attacking because the game can't find a -key. you'd have to also make Alias -key "-attack")
quintoshTobalias key "+attack" (this works fine because the game automatically adds the -attack at the end of the button press)
no, it doesn't add the -attack, unless you meant to bind the key, not alias it

Thank you guys, your replies help me solve my problem! <3

[quote=Tob]alias preset0 "load_itempreset 0"
alias +key "bind f preset0"

Haven't tested it for this but this is the easiest way I know to get around quotations not working

edit: also I think you can leave out the + in +key
If you add a + it means you want there to be a line being executed at the start of the button press. But the game will then look for a -key to execute at the end of the press.
for example:
alias key "+attack" (this works fine because the game automatically adds the -attack at the end of the button press)
alias +key "+attack" (this will keep attacking because the game can't find a -key. you'd have to also make Alias -key "-attack")[/quote]
[quote=quintosh][quote=Tob]
alias key "+attack" (this works fine because the game automatically adds the -attack at the end of the button press)
[/quote]

no, it doesn't add the -attack, unless you meant to bind the key, not alias it[/quote]

Thank you guys, your replies help me solve my problem! <3
Please sign in through STEAM to post a comment.