Make key combination to launch skills

0 favourites
  • 9 posts
From the Asset Store
Random Maze Generator with Door & Key System - tutorial capx
  • I would like to make keys combination in order to launch skills in a fighting game.

    for example :

    down -> right -> B = fire ball

    any tips ?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Yeah its super easy.

    Create an event, and then right click it and use "add condition" then add your second condition.

    eg:

    keyboard button "Down" is pressed

    keyboard button "right" is pressed

    repeat to add a third condition

    keyboard button "b" is pressed ->do fireball

    now the fireball will only occur if all keys are currently pressed.

  • I'll give you a nice tip !

    Go check the beginners tutorial before starting your game :3 !

    Cheers !

  • The thing is, i don't want these keys to be hold at the same time to launch the skill, i want to press one by one the keys.

    press "DOWN", THEN press "RIGHT", THEN press "A" and THEN the fireball is launched.

    And when you make an event "Keyboard - On key pressed" the only new condition available is "key down", it doesn't help very much.

  • Your going to need to store your input into a array or some list that you can look back on. Create an array that can store about 1/2 seconds of input.

    Every input should be stored into the array.

    When a movement key input(like punch) is pressed. Then track the the movement backwards to make sure only wanted input is used.

  • OK. so I gave this one some more thought. rather than store every tick of directional input. Store each change of input with a timestamp. That way you have to store less and can check to see if the time stamp is within the range of the move.

  • I'll try something in this direction, thanks !

  • There's actually a plugin for this very thing that rexrainbow made. You can check it out here:

    Sequence Matcher

  • Well this is exactly what i need, thank you very much !

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)