Create custom animation sequences that eliminate duplicate frames in your sprites.
This set of scripts allow you to create an animation sequence and then call a function in your draw event to calculate which sprite image_index to draw for the current step. The scripts will keep track of how long each animation frame should be displayed and which sprite image_index to draw for the current animation frame.
See the included demo project or the screenshots here for example code to implement an animation sequence in an object's Create, Draw, and Clean Up events.
When adding to your own project just import the scripts.
Script overview:
animation_sequence_create();
Creates a new animation sequence and returns the id.
animation_sequence_add_frame(sequence, image_index, steps);
Add a frame to an animation sequence.
animation_sequence_next_image_index(sequence);
Returns the image_index to draw for the current step.
animation_sequence_completed_count(sequence);
Returns the number of times the animation has been completed played.
animation_sequence_destroy(sequence);
Destroys the animation sequence.
End User Licence Agreement (EULA).