How do I Player Roll on Double Tap Key

0 favourites
  • 2 posts
From the Asset Store
Full game Construct 2 and Construct 3 to post on Google Play
  • Ok, so this is what i have.

    http://imgur.com/gXnZbSM

    It is working as intended. However, i cannot find a good way to make a realistic looking roll. When setting the player_box.X+150 it looks more like a teleport, as it moves instantly to the location.

    I tried playing around with setting the platform X Vector, but the doubletap variable does not stay long enough for anything to happen. Attempts to make the variable stay 1 or 2 for longer affect the normal left/ right controls.

    Ive been messing with it for a while and feel a bit braindead atm. Any advice or pointers would be appreciated, thanks.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Maybe give the player object an instance boolean variable called Roll and use that to control the rolling? Like:

    if Roll is true & every 0.1 seconds (not sure on the timing, try different things): set player_box.X to player_box.X + 1 (or however many pixels)

    if doubletap = 1: set Roll to true, wait 1 second, set Roll to false

    Then you may just need to adjust the normal left/right controls so they don't apply while Roll is true.

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