License from €75 Log in
DE EN FR ES IT CZ

How to make a combo action?

This thread is a few years old. Some details may refer to an earlier version of Visionaire Studio. Current tutorials

  1. · 12 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

  2. Working on a game?

    The free version covers up to 25 scenes per project. For more scenes and to sell your game, you need a license.

    See licenses Try it for free
  3. · 12 years ago
    should it "fail" if any other button is bressed or are only these keys involved?
  4. · 12 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.
  5. · 12 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!
  6. · 12 years ago
    Haha man I admit I cant get this to work, going to see if my friend can and then go from there.
  7. · 12 years ago
    please give some feedback if you get it working. I think this can be useful for other guys here, too
  8. · 12 years ago
    No worries dude, will do.
  9. · 12 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.
  10. · 12 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.
  11. · 12 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).
  12. · 12 years ago
    Sweet just shot you an email!

This thread is closed because nobody has replied for more than a year. Feel free to ask your question in a new thread.

New thread

Really delete this post?