Keep jumping when hitting a solid

This forum is currently in read-only mode.
From the Asset Store
Jump on candies, collect candies and earn score!!!
  • Hey everyone,

    Currently, when my character hits a roof (solid) his jump is ended immediately and he falls down. Is there a small option that allows me to finish the jump (ie don't fall down immediately) or do I have to create this ability myself?

    If you don't know what I'm talking about, I can recommend to play this game: http://www.kongregate.com/games/Arkeus/diamond-hollow

    It's a great platformer with very good gameplay. On of the things is that, when you hit a platform, you don't fall down immediately and can still move in the air. This allows the player to have more control over the character and improves the playability a lot.

    (I've learned a lot of small things by playing this game, I can really recommend playing it!)

  • For your problem what I would do is create the event for finishing the the jump. I'm not an expert,I just started out using construct so I don't know all the options. If you haven't done this tutorial about platforms yet, it may be useful:

    PS that game in kongregate looks cool, thanks for sharing.

  • Muurtegel, I've never experienced the problem that you're having so I'm not sure what's going on there. Are you using Platform Behavior or your own events?

    When I make a sprite with Platform Behavior and jump into the ceiling, I don't fall straight down and I am still able to maneuver the sprite as it falls.

    Or perhaps I'm not understanding the issue correctly. Could you post a .cap showing the problem that you're having?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • When I make a sprite with Platform Behavior and jump into the ceiling, I don't fall straight down and I am still able to maneuver the sprite as it falls.

    I'm pretty sure he wants the sprite to push against the ceiling until the jump is over and the sprite starts falling.

  • Thanks Lunar, will think about it. I don't have a lot of time until the deadline though (and it sounds pretty hard).

    > When I make a sprite with Platform Behavior and jump into the ceiling, I don't fall straight down and I am still able to maneuver the sprite as it falls.

    >

    I'm pretty sure he wants the sprite to push against the ceiling until the jump is over and the sprite starts falling.

    Yeah that's it. It's easier to jump to other platforms in a small space that way.

    If it's too complicated, I'll just have to live with the way it is right now.. I was just wondering if there was an easy solution to this..

  • Okay. I was a bit confused. I thought that's what you meant at first, but the game you linked doesn't do that. Maybe it's hard to see because the bottom part of the platforms overlap the player.

    Anyway, you could create your own jump mechanics that do what you need with events. With varying degrees of difficulty, depending on how you do it. You might even have an easier time trying to create your own platforming movement with Custom Movement behavior, rather than trying to finagle the Platform behavior into doing something it doesn't want to do.

    If you do make custom jumping it will likely have to be custom gravity as well. I would try making a variable called "VerticalSpeed". When the player just standing there, VerticalSpeed would be at something like 800. When the player hits the Jump button, it sets VerticalSpeed to, say, -400. Or something. Then, every tick you count VerticalSpeed back up towards 800.

    Then you can do an Always event where the player's actual vertical speed is set to the VerticalSpeed variable, and jumping and gravity will be handled for you that way.

    This would allow the sticking to the ceiling effect that you want, because even if the player hits a ceiling, whatever remaining negative speed you have left over from the jump will still need to run it's course. So the player will continue to move towards the ceiling until VerticalSpeed is greater than 0, at which point he will start to fall.

    That's the theory anyway. Good luck

  • Okay. I was a bit confused. I thought that's what you meant at first, but the game you linked doesn't do that. Maybe it's hard to see because the bottom part of the platforms overlap the player.

    Anyway, you could create your own jump mechanics that do what you need with events. With varying degrees of difficulty, depending on how you do it. You might even have an easier time trying to create your own platforming movement with Custom Movement behavior, rather than trying to finagle the Platform behavior into doing something it doesn't want to do.

    If you do make custom jumping it will likely have to be custom gravity as well. I would try making a variable called "VerticalSpeed". When the player just standing there, VerticalSpeed would be at something like 800. When the player hits the Jump button, it sets VerticalSpeed to, say, -400. Or something. Then, every tick you count VerticalSpeed back up towards 800.

    Then you can do an Always event where the player's actual vertical speed is set to the VerticalSpeed variable, and jumping and gravity will be handled for you that way.

    This would allow the sticking to the ceiling effect that you want, because even if the player hits a ceiling, whatever remaining negative speed you have left over from the jump will still need to run it's course. So the player will continue to move towards the ceiling until VerticalSpeed is greater than 0, at which point he will start to fall.

    That's the theory anyway. Good luck

    Thanks for the explanation. I know what you're talking about and how, in theory, it works. I'm going to finish my to do list for the necessary functions first and when there's some time left, I'll look into custom movement behavior.

    The game needs to be finished in 1 or 2 weeks, and I still have a lot of work to do so it might get tricky.. Thanks for helping me though!

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