How to freeze sprite animation on last frame?

shrouk picture shrouk · Apr 12, 2016 · Viewed 21.5k times · Source

I want to make a sprite in game maker that contains 5 sub images to stop when it reaches the last one how can I do this using code?

Answer

Dmi7ry picture Dmi7ry · Apr 13, 2016

In Animation End event:

image_speed = 0;
image_index = image_number - 1;