0 Favourites

Jumping from falling objects

  • 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?

    <img src="smileys/smiley36.gif" border="0" align="middle" />

  • 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 platforms

  • 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.

  • 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.

  • Still having Problems?

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • Are you using platformer behaviors for the player and is the platform a solid?

    You can create an air jump with a platformer but if the platform is a solid the player should be able to jump as it is falling.

    Instead of using physics to make the block fall use the bullet behavior. Physics and other behaviors do not mix well and give strange results.

  • if your using platformer behavior wont work, since the following will occur:

    1 you will land yes, but you will still be falling, which conflicts with the landing of platform behavior and nulls the jump

    2 your still falling

    fix

    instead of platform jump

    use platform set y vector or something like that and push it automatically at what force you want.

  • You could set a very small grace time period in which a character can jump even if they are not touching ground (that only occurs when touching falling platforms), you'd just set it to bypass the ground touching test for jumping, during that time.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)
Similar Topics Posts Views Last Post
Unread hot topic
168 15,512
Lumicreative's avatar
Lumicreative
Unread hot topic
167 14,489
DMT2005's avatar
DMT2005
Unread hot topic
123 14,868
Zebbi's avatar
Zebbi