and what about the animationDraw the sprite with the flip, instead of flipping it directly.
Use a variable like facing, and set that to the direction, either 1 or -1. To show that on the sprite, just draw the sprite using draw_sprite_ext() and set the image_xscale to facing.
im using iindex to replace image_index, because if i use that last one i would need to use sprite_index too, but that would make the game slower, but hey, the less code the betterYou can just use the built-in image_index for the animation. I believe the game will use the current frame as the mask.