How do I make jump high depends on touch duration

0 favourites
  • 4 posts
From the Asset Store
High Low is a casino game using luck and points accumulation.
  • I want to create jump'n'run game and allow the player to jump only by touching somewhere on the screen. But it performs always the same high jump.

    Is it possible to let the player jump short if the play touch and release the screen fast? And if he is touching longer the jump will higher (till the amount of the set jumpstrength.

    Is this possible? If yes, know anybody how?

    Thanks.

    Here is the live HTML5 demo.

    http://envato.wdbase.de/wp-content/demo/runner/

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi, try this. IMHO, make instance variable for background & name it "jump" then set event: When touch on touching background, every 1 sec ==> action: add 1 to background.jump

    then add, if touch released, if jump = X value ==> action set player platform strength to any value.

    So for each X jump value , different jump heights. Hope it helped!

  • This is easy, no variables needed

    touch > on any touch start > simulate "player" platform movement jump

    touch > on any touch end & player.platform player is falling (inverted so player isnt falling) > set player Y vector to 0

    basically the inverted player is falling action will make it so you cant just tap over and over to get some hang time in the air.

    done and done.

  • Thanks to both of you

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