Varied Jump Power Using Physics?

Get help using Construct 2

Post » Wed Feb 19, 2014 7:18 am

Hey guys, I was a bit stumped on this one and was hoping someone might be able to help me out.

I'm aware of how to allow the player to jump at varying heights using the platform behavior, but what about when using the physics behavior only? Platform has the ever useful Vector Y expression which would normally allow me to do this, but I can't seem to find an alternative for Physics.

So, in short, if I wanted the power of the player's jump to be based on how long they hold down the jump key, how would I go about doing that using the Physics Behavior?

I would appreciate any ideas or help with this!
Posts: 156
Reputation: 2,117

Post » Wed Feb 19, 2014 7:56 am

The physics behavior provide you with the action "Apply force", that let you specify a force on X and Y applied to your object. If you apply this force on Y while the jump button is down, you should have some kind of rocket jump style. Just add a time limit, or a weakening in the force as the jump is hold longer, so you can control the maximum jump height.
Posts: 473
Reputation: 6,191

Post » Wed Feb 19, 2014 8:23 am

I was thinking that when a key is pressed then store the time (wallclock) when this key is released take this stored time from the released time to get the time key was held. Use this "Time the key was held down" to power the jump....

capxRamPackWobble2014-02-19 08:35:47
August 2015 - I misplaced a lot of links - I will try to find backups and repost. If You find a post that interests please reply to post with @rampackwobble and I will get a nudge!

If you find my posts useful please consider donating something to a local charity or to the
Posts: 1,194
Reputation: 30,882

Return to How do I....?

Who is online

Users browsing this forum: lahbach, Yahoo [Bot] and 26 guests