r/gamemaker • • 9d ago

Help! How do I stop an animation loop?

I want to have an animation play for a full loop and then pause permanently. How do I do that in GML Visual? And don't suggest learning GML Coding. I much prefer Visual, and I don't have the patience for a bunch of "just learn how to program man" comments.

6 Upvotes

7 comments sorted by

3

u/thatmitchguy 9d ago

Look up Animation End Event in the object. It does exactly what you're requesting.

2

u/Daniel_Studios59 9d ago

In the object?

2

u/germxxx 9d ago

And when you've found the animation end event, you set the image speed to 0, and the image index to the last frame, to make sure it stops animating and doesn't show the first frame again.

1

u/Daniel_Studios59 9d ago

Figured it out a lil bit ago. Thanks tho!

1

u/yaninyunus 9d ago

You know how there is a panel of events where there is Create, Step, Draw etc

you'll find animation end event in there

1

u/Daniel_Studios59 9d ago

Figured it out a lil bit ago. Thanks tho!

1

u/TPECKA180 5d ago

You can do this entirely in GML Visual. Add an Other → Animation End event to your object, then use the Set Animation Speed action with a value of 0.

If you want it to freeze on the last frame, use Assign Variable to set image_index to image_number - 1. No need to switch to GML Code.