How do I set up logic for double tapping key input?

  • Hey, so I'm trying to figure out how to set my Platform Character to fall through a jump through platform if I double tap the down arrow key, or down on the DPad.

    Everything I've tried so far just have the first keypress trigger both conditions, so I'm kinda stumped.

    Here's my setup so far, using a boolean and timer to try and seperate each keypress, to no avail.

  • Try this.

    1.)Create an integer named x and equate it to 0.

    2.) now make a system event "repeating every seconds". In it put time equal to 0.001 seconds(please experiment with the time, I exactly do not remember). Through this event put x=0

    3.)now create another event "your touch section". In it, whenever the user touches the screen, add 1 to x

    4.) the real game starts. Now make a system event (every tick one). And remember the condition:

    If the value of x>2, then make the x equal to 0 and make it do your task like what you want your character to do at double touch hit

    Have a nice day

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Try this.

    1.)Create an integer named x and equate it to 0.

    2.) now make a system event "repeating every seconds". In it put time equal to 0.001 seconds(please experiment with the time, I exactly do not remember). Through this event put x=0

    3.)now create another event "your touch section". In it, whenever the user touches the screen, add 1 to x

    4.) the real game starts. Now make a system event (every tick one). And remember the condition:

    If the value of x>2, then make the x equal to 0 and make it do your task like what you want your character to do at double touch hit

    Have a nice day

    Thanks for the input.

    I actually was interested in keypresses, not touchscreen taps though ^_^;;

    You gave me a good jumping off point though. This is what I came up with. Works really well and is pretty simple. Thanks again!

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