How do I disabled a key When another key is pressed?

0 favourites
  • 5 posts
From the Asset Store
Random Maze Generator with Door & Key System - tutorial capx
  • Hello friends!

    As a new person to this wonderful system I have a question please regarding the simple platform game I am building (after all first project so I start with the basics of the game style) -

    I created a situation where my character can do a double jump, and when he does the double jump there is a different animation (using variables and such)

    The problem is - when you make a second jump, you can keep pressing the jump key (in this case the top arrow key) and then it repeatedly performs the animation.

    I am interested when the player presses the jump key for the second time performs the double jump and cancels the option to press the jump key again (until of course he lands back on the ground)

    In a similar issue - I did when the button pressed the bottom arrow key my character bends - the problem is that the player can continue to press the keys left and right and it moves him in these directions (although I turned his speed to 0 when the key is pressed - he does not move but still my character "turns "In this direction) - How can I cause that once I press the bottom outer key the left and right keys are disabled for the time the down arrow button is pressed?

    Thank you very much ^ ___ ^ Really appreciate the help

    Tagged:

  • add an inverted downkey condition to the rightkey and leftkey events. so these events only can be active if the downkey is not pushed.

    hope I understood you issue correctly. :)

  • Thanks so much for the quick reply - but ... how exactly do I do it? (Again I'm pretty new to this I only started in the last few days) Thank you very much

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Just open the Kiwi Story project for example, there you can see the event sheet for the controls. They use inverted conditions.

  • Right click a condition and there should be invert in the context menu.

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