
He jumps just fine when he's standing still, but when you make him run left or right, the jump sprite for left or right will be replaced with a single frame of his running left or right animation, like so...

Now I'm not sure precisely what line of code is the culprit, but here is the code for the gravity/jump sprites.
if (place_free(x, y + 1))
{
gravity = 0.5;
can_shoot = false;
airborne = true;
// Sprite check (jump)
if aimdir = 3 or aimdir = 4 or aimdir = 5
{
sprite_index = spr_p1_jump_R;
} else {
sprite_index = spr_p1_jump_L;
}
} else {
gravity = 0;
can_shoot = true;
airborne = false;
// Sprite check (idle)
if aimdir = 3 or aimdir = 4 or aimdir = 5
{
sprite_index = spr_p1_idle_R;
} else {
sprite_index = spr_p1_idle_L;
}
}Other than that, I just have him jump when S is pressed (if place free then vspeed = -5). In addition, two more minor bugs are present - sometimes when you land and switch directions rapidly, you'll get stuck in the ground until you jump again, and he only stays in the jump sprite as long as S is held down.
Here is the link to the game file...I'd love some glances at the code if you haven't already figured it out.



Find content
Not Telling

