(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:
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