How do I double tap to run, increasing the speed

0 favourites
  • 8 posts
From the Asset Store
Full game Construct 2 and Construct 3 to post on Google Play
  • Hi,

    I need to simulate the character to run when the player double tap or double click.

    The hardest part for me is to increase the speed as the player keep tapping/clicking and to decrease when the player stop tapping/clicking until the character stops.

    Also, I need to take in consideration the FPS.

    Can someone help with me this?

    Thanks,

  • There is a function on construct 2 that reads double taps or double clicks and also there's functions that capture the moment the player releases the button. Just set the speed of the character according to this events.

  • You theory is good but it is more complicated than that. Especially because of the increase and decrease of speed.

  • Do you want the speed to increase more and more as the player keeps tapping?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Yes. Until it reaches a point.

    It would be like track and field. If you keep tapping, the player would run faster.

    if you stop, the player would start losing the speed.

  • u should use system every tick touch player on tap increase speed by x seconds i guess.

  • I'm going to reply here instead of making a new thread:

    There is a function on construct 2 that reads double taps or double clicks and also there's functions that capture the moment the player releases the button. Just set the speed of the character according to this events.

    I can't seem to get this right, when I press right arrow to move my character forward, it will automatically act on running speed.

    Here's my EventSheet:

    https://www.dropbox.com/s/pnhfmg8qxza7s ... 2.png?dl=0

    My goal is to double tap and hold on the second tap to run. What am I doing wrong?

  • Bro, one way I use to this is controlling this with the animations.

    If the player press the move button with the idle animation playing, then the char walks. If the key is pressed and the moving animation is playing, then the char starts to run.

    Give it a try

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