Programming Jumping and Gravity in Fusion 2.5?

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.
  • So I'm currently building a bare-bones functioning game that involves simple platforming. Quite literally a box moving left and right and jumping. I know there's an option to assign platforming movement to an active object, but I honestly would be more comfortable and would feel more in control if I programmed the movement myself.
    So instead I'm opting for simply adding or subtracting from the X and Y coordinates of the player object while the left and right arrow keys are held down for side-scrolling movement.
    However, I have yet to figure out how to use this same method for jumping and gravity. I know being able to jump would be running an event that occurs after hitting a certain key, which takes in the current Y-coordinate of the player and runs it through a parabolic formula. And then gravity would simply be constantly subtracting from (or I guess in Fusion's case, adding to) the current Y-value of the player object while the frame is running. So the question simply is where and how do I implement these things in order to create jumping and gravity. I figure there's a correct syntax for a parabolic formula when creating an event after "jump" is pressed, but for the life of me I can't figure it out. As for gravity, I'm completely lost.

    Thanks and appreciation in advance.

  • Clickteam has a custom platform movement tutorial on their site: Please login to see this link.

    Custom A* Pathfinding in MMF2: Please login to see this link.
    Random Tile World Generation: Please login to see this link.

Participate now!

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