Discord
Login
Community
DARK THEME

Is there any Easy way to play animation once

Is there any trick I can use to play animation once and stop? Example. I have explosion that I want to play once after I hit object with a bullet

Just set a variable to the frame of the animation you want to display, set it to zero when the animation starts, then increment it whenever you want to go to the next frame. When drawing the sprite, all you need to do is set the sprite to "spritename."+animVar.

And don't forget the Sprite Library that @gilles created :)

Check it out: https://microstudio.dev/i/gilles/spriteanimation/

Thank you JmeJuniper & TinkerSmith This Sprite Library is exactly what I'm looking for =)

Post a reply

Progress

Status

Preview
Cancel
Post
Validate your e-mail address to participate in the community