Jumping from falling objects

Get help using Construct 2

Post » Thu May 10, 2012 6:43 pm

I'm having a bit of an issue with my game. I have platforms that start to fall once the player jumps on it. The problem is the player cannot jump off of the platform lol. Its sort of funny but i don't want that to happen.




I want the player to be able to jump off of a platform at anytime. Its like the players gravity goes down with the falling object. I guess its realistic but how can i make it to where the player can jump from falling objects?

B
22
S
5
G
3
Posts: 194
Reputation: 5,855

Post » Thu May 10, 2012 7:24 pm

Can you post an example capx? Or at least tell how your platforms are created. Normally platforms don't fall, so you had to do something to make them fall, like add a bullet or sine or physics behavior or something.

My guess is that as the platform lowers the player keeps falling onto it, and the player can't jump when falling. You may need to implement something like a double jump to allow the player to jump when in the middle of falling.

Edit: This thread should help you:

Jumping on vertical platformskittiewan2012-05-10 19:42:44
B
29
S
11
G
12
Posts: 281
Reputation: 11,888

Post » Thu May 10, 2012 9:17 pm

yea i added a physics to a block. When the player jumps on the block it falls and the player falls. Its initially set to immovable and when the player steps on it its movable.
B
22
S
5
G
3
Posts: 194
Reputation: 5,855

Post » Fri May 11, 2012 2:36 am

The problem seems to be that the platform and the player fall at different rates, so the player keeps going into falling mode (instead of standing on the platform.) The player can't jump when falling, so that is the problem.

Here is a starting point. Uses a doublejump technique to change the player vectory when the player is falling to make it jump upwards again.

fallingPlatformJump.capx

You'll need to do something to prevent doublejump when you aren't on the moving platform (if you don't want the doublejump always, that is.) Maybe set a boolean instance variable that allows/prevents doublejump.

Also there is a growing gap between the player and the platform as it falls that I don't know how to get rid of at the moment.

PS - there is a boolean on the falling platform that if set to true makes the falling platform fall only as long as the player is on it. In the example I have this turned off for both falling platforms. You can turn it on to experiment with.kittiewan2012-05-11 02:39:41
B
29
S
11
G
12
Posts: 281
Reputation: 11,888


Return to How do I....?

Who is online

Users browsing this forum: h1k3, Unconnected and 0 guests