Charge Jump Mechanic

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.
  • Hi,

    TL; DR
    I want to make a charged jump into a platformer type game. Basically its the same as in Prototype:
    Hold down jump to charge up the jump.
    Press jump to jump normally. (whether it adds to the charge bar is irrelevant).

    -----------------

    I'm new to MMF2 and i've only been using it for a few weeks.
    I've been following tutorials of different genres to gain an understanding how things are done in MMF2.
    I've started on making a scrolling platformer game and i've got the basics down as well as player movement although i had to search on how to make double-jumps. BTW I'm using the "Platform" behaviour and not PMO: PMO is better but i don't know how to make it act like an infinite runner i.e. it places an object at the edge of the screen when i move right to make it look like you are scrolling.

    But i digress.

    When i hold down jump i want it to start the charge process i.e. Add 1 to counter.
    And when i let go it moves the player vertically.

    But here is the main problem, MMF2 treats "when pressed" and "repeat when pressed" as the same: a button press - as far as i can tell.
    I have a feeling flags, or alterable values are involved to tell it turn jump off and charge the bar until i let got.

    Or is it simply this can't be done? Any help would be greatly appreciated as i've been banging my head for days trying to figure this out.
    Put simply, if anyone has ever played Prototype then you will know what i mean.

    Any help would be greatly appreciated.

  • Repeat while pressed:
    --> Add 1 to counter

    Counter is greater than 0
    +X Repeat while pressed (right click on the condition and click negate to put the X there)
    --> Set Jump Strength to Counter
    --> Set Counter to 0
    --> Jump

    But I don't think you can trigger jumps using the default platform movement via events. Or set Jump Strength even. PMO should be able to do this rather easily, but you'd be better off coding your own engine. Search for DavidN's Custom Platforming tutorial. It's fairly basic and will walk you through making your own movement engine with fastloops. My personal choice however would be a simple vector jump system

    You need two values: Acceleration (gravity), and Velocity (speed). Acceleration should be constant and you should set this to 1 or 2 or so (depending on the strength of gravity you want). Then you want the events

    Always:
    -->Add Acceleration to Velocity

    Always:
    -->Set Y Position to Y Position + Velocity

    This will cause your player to accelerate downwards infinitely. To Jump, set Velocity to a negative value, like -10. This will take effect immediately and cause the player to shoot upward until gravity takes over and it returns to the ground. You will fall through the ground currently, but if you change the Add Acceleration to Velocity event to not occur when the player is overlapping the ground and then nudge the player up a bit when you are you can stop this from happening.

    For a list of my achievements, hit up Please login to see this link..com/
    Unless you want to party, then go to Please login to see this link.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!