The platformer behavior and the up key

0 favourites
  • 3 posts
From the Asset Store
Random Maze Generator with Door & Key System - tutorial capx
  • Hey everybody. I'm wondering if anyone else is running into a problem that I'm running into with the platformer behavior. Quite often, it doesn't register the up arrow key for jump. It's unpredictable when it will decide to not register the keypress.

    There's a CAPX at the arcade (can't link bc low prestige) in the underground jam. Game is called "The Hollow World."

    Is anyone else having this problem? Is this a bug? Is this some mistake that I've made?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • My guess is that because your game environment is circular, the character becomes airborne randomly as it moves, which may make the platform behavior think that the character is not on the ground. You could probably fix this by checking if the character overlaps a platform with an offset of +1 or +2 pixels(or whatever amount helps) in the y axis, and if so when pressing up to make the character jump.

    It might cause the character to jump twice if the character is already on the ground, so you can add another condition that checks if the character isn't on the ground(but is overlapping with an offset)..

    Also, if you don't want to check via an offset, youcould use another sprite pinned to the character and check if it is overlapping the ground. or you can check if point is overlapping ground and use player coordinates..

  • If not your events, it might actually be your keyboard. Try certain key combinations and then press up to test.

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