Half-Life 2

Half-Life 2

View Stats:
Morbis May 15, 2024 @ 3:07pm
Need help binding two commands to same key
So I want to have ent_fire ant* kill on the same key(W) as my forward walk but I'm not sure how you go on about binding two at the same time. Any help?
< >
Showing 1-6 of 6 comments
SKOkirill201 May 16, 2024 @ 12:41am 
bind "w" "command; +forward" (instead of "command" write one that you need)
Last edited by SKOkirill201; May 16, 2024 @ 12:41am
Morbis May 16, 2024 @ 12:42am 
Originally posted by SKOkirill201:
bind "w" "command; +forward" (instead of "command" write one that you need)

Need two at the same time. walk and ent_... one on W.
SKOkirill201 May 16, 2024 @ 1:03am 
Originally posted by Morbis:
Originally posted by SKOkirill201:
bind "w" "command; +forward" (instead of "command" write one that you need)

Need two at the same time. walk and ent_... one on W.
try something like:
alias "mk1" "command1; command2" alias "mk2" "alias1; command1; command2" bind "w" "mk1; mk2; command1; command2"
(You can make as many aliases as you want)
This is the only solution i can think of.
Last edited by SKOkirill201; May 16, 2024 @ 1:07am
Tackro May 16, 2024 @ 8:52am 
when replacing actions like walking or jumping, you need a +alias and a -alias for this, so that when you press W you start walking and stop walking when not pressing W
bind w +killwalk alias +killwalk "+forward; ent_fire ant* kill" alias -killwalk "-forward"
put this into an autoexec or whatever .cfg file you set up to automatically execute.
For just combining any two commands to a key or alias without + or - , just seperate the commands with ; inside of the ""

Not sure why you need to delete all those antlions for, but there you go.
Morbis May 17, 2024 @ 7:43am 
Originally posted by Tackro:
when replacing actions like walking or jumping, you need a +alias and a -alias for this, so that when you press W you start walking and stop walking when not pressing W
bind w +killwalk alias +killwalk "+forward; ent_fire ant* kill" alias -killwalk "-forward"
put this into an autoexec or whatever .cfg file you set up to automatically execute.
For just combining any two commands to a key or alias without + or - , just seperate the commands with ; inside of the ""

Not sure why you need to delete all those antlions for, but there you go.

Can play Nova Prospekt solo that way. :awkward:
< >
Showing 1-6 of 6 comments
Per page: 1530 50

Date Posted: May 15, 2024 @ 3:07pm
Posts: 6