Bindings...

m0nKeY

Newbie
Joined
May 8, 2004
Messages
103
Reaction score
0
I looked for this on google but couldnt find shit about it, so maybe someone here knows...

How do you bind a key to a specific weapon? I cant find the cvar for it at all.

Example from HL1 was:
bind "MWHEELUP" "weapon_gauss"

Same thing in HL2? Anyone have a list on the weapon names the engine uses?

Thanks.
 
the system is roughly the same... if you want to press "k" to get a shotgun, you would enter bind "k" "give weapon_shotgun". Some of the weapons have different names; I'll just list the different ones here


smg- smg1
magnum- 357
pulse rifle- ar2
gravity gun- physgun


there... I think that's it. You can also bind multiple commands to the same key using a semicolon. For example, bind "o" "impulse 101;npc_create npc_gman would cause pressing O to give you all weapons, full ammo, full health, and G-Man. (don't ask why- it's just because). If you want to bind a key so that a command is entered when it's held down, and goes away when it's let go, do it in the following manner (I'm using my scroll button as an example)...



bind "MOUSE3" "+JT"
alias "+jt" "host_timescale .1;phys_pushscale 100;playgamesound *#music/HL2_song16.mp3"
alias "-jt" "host_timescale 1;phys_pushscale 1;stopsound"



and that's that. That command would make make MOUSE3 cause matrixy effects and really badass music when held down. Just remember that you can substitute the "JT" for anything else, and the commands for any other working command.


Finally, if you get reeeeally sick of entering this crap in over and over again, copy it all into Notepad,go to save as, change the setting in "save as type" to "all" then save it as whatever you want to call it, BUT with ".cfg" at the end. Then, save it into "C:\Program Files\Valve\Steam\SteamApps\your steam name here\half-life 2\hl2\cfg", and enter "exec name of the cfg file". WHEW.
 
I generally know how to script, been doing it since release of HL1 just cant find no material on the new commands.

I wanted quick keys for weapons in multiplayer though, is the give command not a cheat to get a weapon before avaliable in the game?

Basically I used to have my most used weapons attached to mouse wheel and some keys in hldm so i could swap real quick in battles. I want to do the same in HL2DM...
 
m0nKeY said:
I generally know how to script, been doing it since release of HL1 just cant find no material on the new commands.

I wanted quick keys for weapons in multiplayer though, is the give command not a cheat to get a weapon before avaliable in the game?

Basically I used to have my most used weapons attached to mouse wheel and some keys in hldm so i could swap real quick in battles. I want to do the same in HL2DM...

when you play hl2dm, check the console after someone dies. i think it says what kills him, those are the weapons names.
 
I have the weapon names now, just cant seem to bind a key directly to a specific weapon.

It doesn't apppear to be bind "MWHEELUP" "weapon_smg1" like it used to be... :/
 
search the config file, located in your hl2dm directory
i think i saw there the deafult bindings. if you find mouse wheel up, then just change the value.
 
Its the values I don't have...

bind "MWHEELUP" "weapon_smg1" doesnt work, in hl2 the weapon_<name> isnt the correct value. They change it and I don't know what to.
 
i managed to find a way:
for the first pistol- bind "mwheelup" slot2 ; +attack ; wait ; -attack
may cause some problems if you bind other weapons, when you dont have them yet, though this is temporary

edit: actually this doesnt work with binding, only regular console typing for some reason. maybe someone knows how to do it properly
 
I found the answer.

bind "?" "use weapon_rpg"
bind "?" "use weapon_357"
bind "?" "use weapon_shotgun"

etc etc...

Thanks for your help though, appreciated.
 
Back
Top