So I've coded a few custom player animations into YoYoYo's GMS engine, but I encountered a weird bug.
What I want to make is a double jump animation, that plays once on the second jump press in the air.
However, for some reason the animation which has 9 frames
- at the start stays on the first frame for 3 loops
- loops back to the 1st frame after only the fifth
Does anyone have any idea of what could be causing this?
I set global.playerAnimationFix to true.
Here are the relevant snippets
scrJump:
...
if (!place_meeting(x,y+(global.grav),objWater3))
{
djumped = true;
djump = 0; //take away the player's double jump
...
End step:
...
else //in the air
{
if(djumped)
{
image_speed = 0.4;
show_debug_message("djump"+string(image_index))
sprite_index = sprPlayerDoubleJump;
if(image_index > 8){
djumped = false;
}
}
else if(...)
...
Console output below.