How to make a combo action?

  • #1, by DilatedSunday, 12. July 2015, 10:39 9 years ago
    So basically I'm looking to set up something that if you press some keys in the exact sequence, it will then call an action.

    The exact thing I want is.

    Press Z+Z+X+Z+Z in that exact order, call this action.

    I started to try to get it working via values manipulation, but it seems to get overly complicated making it work. Problem I found was to get it to work in that sequence even if you have tried a wrong sequence. I'm going to make an assumption doing this in LUA would be so much easier haha.

    Anyway does anyone have any ideas?

    Cheers
    Jacob

    Forum Fan

    149 Posts


  • #2, by sebastianSunday, 12. July 2015, 12:43 9 years ago
    should it "fail" if any other button is bressed or are only these keys involved?

    Thread Captain

    2346 Posts

  • #3, by afrlmeSunday, 12. July 2015, 13:22 9 years ago
    Well... you could use a single value that you add each character pressed to the string section of the value, or you could even use a Lua variable... Doesn't really matter.

    I guess the simplest thing would be to use the Lua key event handler as it would save you a lot of time in comparison with having to create & add actions for each key in the key actions list.

    I'm going out shortly & have yet to finish washing up & jump in the shower, so unfortunately I don't have the time at the minute to be able to provide you with an example script or better explanation.

    http://wiki.visionaire-tracker.net/wiki/RegisterEventHandler -- check last code example. It's a bit more complicated than it needs to be as the example shows the various different methods of checking key states.

    Imperator

    7278 Posts

  • #4, by DilatedMonday, 13. July 2015, 07:45 9 years ago
    @Sebastian.204 Yes. Basically there will be a menu, if you press that sequence in that exact order it will work. However if you press something else or in the wrong order, it will reset itself, requiring you to start from the beginning. No feedback is show until you put in the sequence.

    @AFRLme Thanks man! Take your time, whenever its easier. I'll check out the code and see if I can suss it out also!

    Forum Fan

    149 Posts

  • #5, by DilatedTuesday, 14. July 2015, 04:55 9 years ago
    Haha man I admit I cant get this to work, going to see if my friend can and then go from there.

    Forum Fan

    149 Posts

  • #6, by sebastianTuesday, 14. July 2015, 08:50 9 years ago
    please give some feedback if you get it working. I think this can be useful for other guys here, too

    Thread Captain

    2346 Posts

  • #7, by DilatedTuesday, 14. July 2015, 08:51 9 years ago
    No worries dude, will do.

    Forum Fan

    149 Posts

  • #8, by afrlmeTuesday, 14. July 2015, 14:41 9 years ago
    It's relatively simple, yet not that simple! grin

    The key action method as seen in a template I provided earlier in the year that showed how to sort out key input took me almost 3 days or so to create & get working properly as I had to create actions inside of each key event. The Lua script key event handler didn't exist at the time.

    P.S: Sorry. Been a bit busy.

    Imperator

    7278 Posts

  • #9, by DilatedTuesday, 14. July 2015, 14:48 9 years ago
    All good bro, you're a big help around here. grin

    As I've mentioned before, more than happy to shoot some donations/payment for this stuff your way man, lets be honest you do so much work for free haha.

    Forum Fan

    149 Posts

  • #10, by afrlmeTuesday, 14. July 2015, 15:02 9 years ago
    All good bro, you're a big help around here. grin

    As I've mentioned before, more than happy to shoot some donations/payment for this stuff your way man, lets be honest you do so much work for free haha.


    If you want to do that, then send me an email afrlme(at)outlook(dot)com detailing exactly what you want & an offer of what you are willing to pay / donate for my services / help.

    P.S: I do actually provide freelance development, scripting & troubleshooting (tips, ideas, solutions, workarounds).

    Imperator

    7278 Posts

  • #11, by DilatedTuesday, 14. July 2015, 15:24 9 years ago
    Sweet just shot you an email!

    Forum Fan

    149 Posts