0 Favourites

(Solved) Continuous Jumping with Platform Behavior

  • Trying to create a floating "joystick" that when in the up position makes the player jump continuously.

    It's also going to control the player's left and right movement.

    The YP and XP vars are from the joystick. The joystick triggers: left, right, jumping or falling-through actions.

    The problems I can't solve:

    1. Having the sprite remain mirrored after the joystick is released in the right position

    The mirror state it stays in after letting go of the joystick depends on which event is placed first in the event sheet.

    2. Continuously jumping while holding up.

    When the joystick is up it seems to hold the simulated jump button, and while it's held, the "on lands" event doesn't fire to make the character jump again. I've tried using variables, functions, and a slew of different logical ladders to try and make it work... No luck though.

    If I can't get the platform behavior to do what I'd like, I will consider using a more manual way of controlling the character. Functions maybe?

    Thank you in advance.

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • There is an infinite jumper example that comes with C2, that might help you out.

    Alternatively, post a CAPX and I'll take a look

  • when the joystick is released, XP = 0, so it is both inferior to 15 and superior to -15, so the lowest event runs.

  • when the joystick is released, XP = 0, so it is both inferior to 15 and superior to -15, so the lowest event runs.

    Thank you! That fixed the mirroring problem.

    This is what I changed it to for the player sprite mirroring to work, for anyone that's curious:

    As for the continuous jumping, I used the "trigger once" system event to produce this:

    Thank you andreyin for answering this in an unrelated question I had here:

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