How do I cancel/stop a jump while jumping?

From the Asset Store
Jump on candies, collect candies and earn score!!!
  • Hello, I'm looking for a solution of a problem as below:

    Situation:

    - The character is jumping left/right (platform, by action "simulate jump").

    - While the jump starts, i set a variable "is_jumping" = true

    - While it is true, I simulate "move left" - a way you can't change the jump direction - you just jump from point A to B, no matter what you do.

    - When it lands, the "is_umping" is set to false.

    - While the character is in the air and overlaps a "ladder", I disable the "platform behaviour" (and let the character to climb on ladder).

    - While the character is not overlapping the ladder anymore, I turn the behaviour "platform" on again (for example the character leaves the ladder to the right), but then the jump is beeing continued. So the character instead of falling down, continues the jump from the moment it started to overlap the ladder.

    Any suggestions, how to reset the jump would be super duper appreciated :-)))

    Thanx in advanced!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • On overlap ladder, set is_jumping to false

  • It's because when you disable the behavior, it registers the last vector movements of your sprite, so when reactivated, the vector continue its movement, you need in that case to set your sprite vector Y to 0 when it grabs the ladder

  • On overlap ladder, set is_jumping to false

    is_jumpin is my "private" marker, it doesn't really do anything to the phisics, and also I did set it to 0 (or false)

    set your sprite vector Y to 0 when it grabs the ladder

    That's it! Thank you :-)

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