How do I double tap keys to dash?

0 favourites
  • 3 posts
From the Asset Store
Full game Construct 2 and Construct 3 to post on Google Play
  • Hello, I'm messing around with making a small platformer game, and I'm having trouble getting a dash to work. I want it so that when you start moving, you can quickly tap again at any time to start dashing, similar to how it works in something like Kirby. I figure some timer or variables are involved, but I'm still very new and am having trouble figuring it all out.

    I'd appreciate any help, thanks!

  • You can use the touch plugin

    ------------------------------------------------------------

    global number speed = 25

    condition: on double-tap gesture on (object_name)

    action: set global variable (i.e., speed) to 100 or Add 25 to global variable (i.e., speed)

    Wait 3.0s

    set global variable (i.e., speed) to its initial value or subtract 25 to global variable (i.e., speed)

    you can try different combinations =)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • A possible solution:

    Create a valiable named, for example: dashHelper

    if dashHelper > 0 -> Set dashHelper to Max(dashHelper - dt, 0)

    if player moves (or just check for left/right movement)

    and dashHelepr == 0

    • > set dashHelper to 1 (or something smaller, bigger, try it out how you want it)

    if player moves (or just check for left/right movement)

    if dashHelper > 0

    -> make the player dash

    Hope it helps

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