image_index

Example

image_index = 2;

 

This function sets the frame of the sprites animation, in the above example, instead of the animation starting at the default subimage ( 0 ), it will start at frame 3 (0, 1, 2). When the image has multiple sub-images the program normally cycles through them when placed on the screen but you may wish to stop the animation and just show a specific frame, image_index along with image_speed does just that:

 

image_index = 2; // 3rd frame of animation

image_speed = 0; // Stop the animation

 

Revision #1