Engine Mod: ActionMap Key combos
by Kevin James · in Torque Game Builder · 10/25/2012 (10:17 am) · 3 replies
Hey all,
I'm wanting to be able to detect key combinations, to include hitting the same key 2 or 3 times in a row.
I'm thinking that this is probably one of the most simple engine modifications to do and would be a good place to start modding the TGB engine.
I would def. be curious about people's opinions on the benefits of a scripting solution for key combos vs. an engine mod for including key combos as an action mappable thing.
I'm wanting to be able to detect key combinations, to include hitting the same key 2 or 3 times in a row.
I'm thinking that this is probably one of the most simple engine modifications to do and would be a good place to start modding the TGB engine.
I would def. be curious about people's opinions on the benefits of a scripting solution for key combos vs. an engine mod for including key combos as an action mappable thing.
About the author
Computer security, digital forensics, and platform jumper enthusiast. shells.myw3b.net/~syreal/
#2
Brainstorming: maybe the keys would need to be pressed in a certain rhythm, within a given error allowance, but that doesn't seem useful for most games.
Think I'ma start looking at the engine source
10/25/2012 (6:08 pm)
No, that's exactly what I was thinking.Brainstorming: maybe the keys would need to be pressed in a certain rhythm, within a given error allowance, but that doesn't seem useful for most games.
Think I'ma start looking at the engine source
#3
Passing in extra values to bind would probably be difficult ... mostly because there's no API or documentation on engine modding that I know of.
10/26/2012 (12:34 pm)
So after looking at the engine source, the createKeyEvent function looks most promising. The command will probably end up looking like:moveMap.bind(keyboard, "combo a a", "stuff();"); moveMap.bind(keyboard, "combo left right", "stuff();");
Passing in extra values to bind would probably be difficult ... mostly because there's no API or documentation on engine modding that I know of.
Torque Owner Alpha-Kand
Hunter's Meadow
But Torque engine modding sounds pretty good too. What would be cool is if you have a modified bind command function that would work like this.
That would encompass a lot of awesome. But one thing that might be something to add is precedence valuing. For example, pressing the a button three times would only call the combo function and ignore the single press function.
Would this idea need something more I'm missing?