Louis Ferina
Member
I'm having an issue where I'm trying to draw a sprite animation with variable frame lengths on the GUI layer. The sprite has a few frames of animation that are stretched (take up more than one frame) and some frames that aren't stretched. In the Step event I use a variable animframe that I increment by 0.1 and in the draw GUI event I use draw_sprite(sprite, animframe, x, y). This works for the most part, however the stretched frames are displayed for the same length of time as the non-stretched frames because the first frame is still considered image_index = 0 and frame 2 is always image_index = 1.
Is there any way to account for the stretched frames? I have worked around the issue by duplicating frames multiple times instead of stretching them, but I'd like to find a better solution.
Thanks!
Is there any way to account for the stretched frames? I have worked around the issue by duplicating frames multiple times instead of stretching them, but I'd like to find a better solution.
Thanks!