Advanced Keybindings
adam_0
Join Date: 2013-02-25 Member: 183332Members, WC 2013 - Silver
So yes, I've found the options.xml file, but haven't found any good documentation on how to do certain things. For example, I'm fairly certain that I couldn't add the equivalent of, for example, `bind <key> "name <foo>"` or other advanced bind commands.
I've seen someone on Nexzil (Rantology? Not sure) who's got an animated Kirby name which I think changes when WASD are pressed. I'm not looking for that exactly, but something similar perhaps. Any ideas on how to do this? I'm a programmer so I don't really care if it's complex, I'm just curious how this is done.
All help is appreciated and thanks!
I've seen someone on Nexzil (Rantology? Not sure) who's got an animated Kirby name which I think changes when WASD are pressed. I'm not looking for that exactly, but something similar perhaps. Any ideas on how to do this? I'm a programmer so I don't really care if it's complex, I'm just curious how this is done.
All help is appreciated and thanks!
Comments
and maybe script a last used weapon script - which wouldn't be a problem at other games either :P
Use AutoHotkey. The above script will change the mousewheel into keys 1 and 2 when NS is the foreground program.
I try to use my mouse software as much as possible, but changing the up/down of the wheel is not an option for Logitech mice.
What I'm looking for is the config file equivalent of the following:
bind num1 name “adam_0 test1”
bind num2 name “adam_0 test2”
bind num3 name “adam_0 test3”
bind num4 name “adam_0 test4”
bind num5 name “adam_0 test5”
etc.
bind NumPad1 "name part1 part2"
Will execute `name part1` when NumPad1 is pressed. The `part2` will be discarded due to being the second argument ($2) to a function (for lack of a better term) which only takes one argument.
Okay, let's just surround the name itself in double quotes:
bind NumPad1 name "part1 part2"
Now NumPad1 is bound to `name`. Because it's ignoring $3. Great.
Maybe double quotes? TF2 is pretty good at understanding nested quotes, which from a parsing perspective is pretty interesting:
bind NumPad1 "name "part1 part2""
Nope, now NumPad1 is bound to `name `. Note the space.
Hmm, different types of quotes? No dice.
And finally, escaping quotes (\") works!
bind NumPad1 "name \"part1 part2\""
Phew. This should be documented somewhere in big, bold letters if it isn't already. Also, I'm not sure if further levels of nesting could need more escaping (\\\" etc)...
WheelUp::1
WheelDown::2
1 being my rifle and 2 being my pistol.
My script is working (checked it with notepad) but it seems NS2 has it blocked for some reason. Maybe because when I scroll it's like 5 or 6 scrolls and NS2 blocks input like this?