09-14-2013, 08:13 AM
(06-15-2013, 01:16 PM)Mr. Bougo Wrote:(06-15-2013, 10:49 AM)PillowPants Wrote: If I wanted to set up a custom bind where "g" (or any other key) is "impulse 220" except when playing minsta+hook, where it would be "+hook". How would I go about doing that?
You can't, sorry. There are config hooks* for game start events for each game type, but not for mutators (minsta is a mutator for deathmatch). Besides, there's no way to detect whether or not the hook is enabled on the server. What can be done however is CTF-specific binds, or TDM-specific binds, or race binds etc.
*Not grappling hooks, but a command that can be defined to intercept certain kinds of events.
You can however have a bind to toggle the g key's functionality. Here's how you do it, using p to toggle what g does:
Untested, but should work fine. The -gkey_mh0 in gkey_toggle is to release the key when p is pressed, otherwise you might get stuck with +hook if you press p while hooking. It could have side effects if you have anything special in one of the - binds, but that's not the case here.Code:alias +gkey "+gkey_mh${_gkey_mh}"
alias -gkey "-gkey_mh${_gkey_mh}"
alias +gkey_mh1 "+hook"
alias -gkey_mh1 "-hook"
alias +gkey_mh0 "impulse 220"
alias -gkey_mh0 ""
alias gkey_toggle "-gkey; toggle _gkey_mh; _gkey_toggle2"
alias _gkey_toggle2 "echo ^1g key minsta hook status set to ^3${_gkey_mh}"
bind p gkey_toggle
bind g +gkey
Hi Mr Bouge,
Didn't know you had replied, so thank you first of all


g key minsta hook status set to ${_gkey_mh}
but no change from laser (impulse 220) to hook and vice versa. Could you help me again?
Thanks!!