I have a fade out/fade in room transition set up with a persistent player object. It worked absolutely fine until I started adding running animations to the player object. The following code now breaks the room change every time - it fades out but fails to switch to the new room.
To be absolutely clear, when I remove the above code from my player object, the room transition works *every* time. When I add this code in, it fails *every* time.
Note: it is a separate object that handles room transition - a warp object that activates when the player object collides with it.
Code:
if speed > 0 {
if sprite_index = spr_jink {
sprite_index = spr_rat_running
}
image_speed = speed/12;
if direction > 90 and direction < 270 {
image_xscale = 1
}
else image_xscale = -1
}
if speed = 0 and sprite_index = spr_rat_running {
sprite_index = spr_jink
}
Note: it is a separate object that handles room transition - a warp object that activates when the player object collides with it.