User Tag List

Results 1 to 3 of 3

Thread: Charge Jump Mechanic

  1. #1
    Clicker Multimedia Fusion 2

    Join Date
    Apr 2014
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Charge Jump Mechanic

    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.

  2. #2
    Clicker Multimedia Fusion 2SWF Export Module
    Jacob's Avatar
    Join Date
    Jul 2007
    Location
    Second pixel to the right
    Posts
    3,208
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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.

  3. #3
    Clicker Multimedia Fusion 2

    Join Date
    Apr 2014
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Cheers, i'll give it a whirl and see how i get on.

Similar Threads

  1. Create a wall-jump mechanic?
    By AndyBazooka in forum Multimedia Fusion 2 - Technical Support
    Replies: 11
    Last Post: 17th September 2013, 03:31 PM
  2. Stealth Mechanic: Now He Sees You, Now He Doesn't!
    By TheFieryPlumber in forum Multimedia Fusion 2 - Technical Support
    Replies: 7
    Last Post: 3rd May 2013, 09:12 PM
  3. Possible to make a Jetpack mechanic? Preferable with PMO?
    By Outcast in forum Multimedia Fusion 2 - Technical Support
    Replies: 16
    Last Post: 2nd March 2012, 06:02 PM
  4. Charge Bar for JonF
    By Robert_Matos_Jr in forum File Archive
    Replies: 2
    Last Post: 3rd October 2007, 10:51 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •