HL2 Key Binding Question

  • Thread starter Thread starter dustproxy
  • Start date Start date
D

dustproxy

Guest
Hi All,
I'd like to be able to bind specific weapons to specific keys, instead of just binding groups of weapons to keys, as is the default.

For instance, I'd like to bind the pistol to a specific button, the magnum to another button, etc. I've been editing the config.cfg file, and this is what I have so far:

alias magnum_swap "slot2; invnext; +attack"
bind mouse4 "magnum_swap"
(I might need to put some waits in there, I haven't actually tried it.)

What this does is create a script that goes to weapon group 2 (pistols), highlights the next weapon in the group, and then selects it. Then, finally, it binds this to a key, in this case mouse4. This works fine for now, but if I were to find another pistol that went between the magnum and the default pistol, it would no longer work.

HL2 supports two commands which are sort of like what I'm looking for, bug_swap and phys_swap, these two commands switch to the bugbait and gravity gun, respectively. Do such commands exist for any other weapons? Is there any way to create aliases that would do roughly the same thing? Am I just completely missing something here? Any help is greatly appreciated!

Thanks!
 
Back
Top