The platformer behavior and the up key

Discussion and feedback on Construct 2

Post » Thu Aug 20, 2015 12:29 am

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?
B
6
S
2
Posts: 6
Reputation: 681

Post » Thu Aug 20, 2015 12:52 am

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..
B
41
S
19
G
65
Posts: 1,085
Reputation: 37,842

Post » Fri Aug 21, 2015 6:12 am

If not your events, it might actually be your keyboard. Try certain key combinations and then press up to test.
Image
B
242
S
29
G
13
Posts: 1,787
Reputation: 18,685


Return to Construct 2 General

Who is online

Users browsing this forum: justifun, Yahoo [Bot] and 11 guests