Touch control question

  • Hello, im making game with touch control and platformer behavior, when im touch one time - my character jump, when im double touch - my character make double jump, and i want make this - if character make jump or double jump and im hold touch - charater fall down with acceleration, when im stop holding - character stops accelerating. I want someting like on Dune game from Voodoo - youtube.com/watch

  • All you have to do is change the gravity on the hold event.

  • All you have to do is change the gravity on the hold event.

    Thanks man! Its works!

  • Hey, i have now one more question - this condition works only after my character did double jump, how i can do this after any jump?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I would need a c3p file or a screenshot to help and know I'm pointing you in the right direction. However, I'm going to assume that you are using the on touch hold, if so replace that with this.

    Event: Is in touch; Action: Wait 0.15

    Sub event: Is in touch; Action: Heavy Gravity

    Else: Gravity is default

    This may not work 100% of the time or as intended so test it well and play around with it.

    Sometimes you got to work around the engine, but that goes for every engine.

  • Hi, im trying to make as you say, but in not sure thats im understanding how "Else" works. So this is screenshot of my character control:

    prntscr.com/jwm3ny

  • Okay, for the last event in that set of logic, try to replace the "On any touch end" with an inverted "is in touch" and Platform is falling.

    To invert a condition right click the condition and select invert, this will test if it's not true.

  • prntscr.com/jwmrwl

    But this is dont work :(

    Like this? Sorry for stupid questions, im new in C3.

  • No stupid questions your learning.

    Don't do a sub event.

    Don't invert those conditions.

    Copy the two conditions and replace on any touch end with the two copied conditions.

    Then invert "Is in touch"

  • First Event

    + Touch: Is in touch

    + Player: Platform is falling

    -> Player: Set Platform gravity to 7000

    -> Player: Set animation frame to 2

    Second Event, this has the same conditions, but the "is in touch" is inverted

    + Touch: [X] Is in touch

    + Player: Platform is falling

    -> Player: Set Platform gravity to 1500

    Hope it helps.

  • Oh, its works, but too big delay after first jump and starting fall with speed

  • Try deleting is falling.

  • Actually deleting "is falling" will severely shorten the jump, I'm testing it myself now. This is game dev, trial and error.

  • Its works but seems like i mean little bit another system. Now its works - first touch character jump, second touch - double jump, hold touch - character fall down with speed.

    And i want when character jump first time touch characer jump and after that player hold touch - character fall down with speed.

    For example - first touch screen, character start jump amd then after that if im hold touch - character starts fall down with speed.

    double touch screen, character starts double jump and then if im hold touch - character starts fall down with speed.

    Hoply you understand that :) Thank you very much for your help

  • Use on tap for the jump instead of any touch start, that should do it.

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