How do I do a charge jump?

0 favourites
  • 6 posts
From the Asset Store
Jump on candies, collect candies and earn score!!!
  • Hey guys,

    This will probably be difficult to answer without a capx file but Ill give it a try anyways.

    I ve been trying to figure out the logic to do a character do a charge before doing a power jump.

    I managed to change the total jump height and manage the different states so animations are different in between normal falling and falling after power jumping etc.

    Now, the only missing part is the charge before jumping. whatever I try is just not working.

    Is there a proper way to go with this?

    Thanks in advance.

  • What exactly is a charge jump?

    Never mind now that I read Chris post below I know what a charge jump is referring to and looks like he covered it.

  • I would use a variable that I incremented when the charging was triggered via whatever method/keypress and a condition that allowed the powered jump whenever the value was greater or equal to charged. Unless you want the charging to scale up and it's strength determined by its value.. in this case, I would increment the charge variable until the jump trigger (or button release) and set jump strength based on its current value on release. After either charge is reset to 0.

  • How about making the input for your charged jump Down + Jump ?

    So you can change regular jump input to 'On Jump Pressed && Down not pressed'

    EDIT:

    More suggestions:

    'On Jump Pressed && Down Pressed' | Player start timer 'ChargedJump'

    'On Jump not Pressed or Down not Pressed' | Player stop timer 'ChargedJump'

    On Timer 'ChargedJump' | Jump

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks guys for your suggestions. The problem is at follows:

    When I press the input to start charging, I need to play an animation. So technically after that animation is completed the jump would follow.

    But is not working as intended.

  • Actually I figured out a way to do it. But thanks guys for your suggestions !

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