Fangames > Programming Questions
How can I make a sprite's animation not loop (only play once and then stop)?
(1/1)
			PlasmaKaboom:
			
			Is there an easy way to tell an object not to loop it's sprite animation? When I restart a room I want an animation of one of my sprites to only play once and then stop, only repeating when I restart the room again.
		
			WetWookie:
			
			There's an animation end event. I think you can just set the image_speed to 0 in it.
		
			PlasmaKaboom:
			
			I should have been more specific. The suggestion I was just given does make the sprite animation play just once, however it disappears once it's done. I need it to pause after it plays once (meaning I need it to freeze in place on the sprites last animation frame). Is there a way to do that?
		
			Denferok:
			
			Put this into the animation end event and it should work
image_index = the last image number of your sprite's animation
image_speed = 0
		
			PlasmaKaboom:
			
			Oh my gosh thank you! That's exactly what I was looking for!
		
Navigation
[0] Message Index
Go to full version