How to stop animation?


  • Posts: 524
I'm trying to implement a common death effect where when an enemy dies it fades out. I've realized I need to stop the enemy's animation when it fades out though other wise it looks weird.

Currently I'm setting the run time of the frame the animation is current at to something high, but this is hacky and also require me to stop using recycled actors which I believe is significantly effecting my frame rate.

Is there an better way to stop an animation at it's current frame?


  • *
  • Posts: 1667
I'm not sure why that's stop you from using recycled actors.

Another easy/lazy way would be, I'd think, to get current frame for self and then set, under updating, the current frame to that frame.


  • Posts: 2262
Image api? Create an image from the actor and fade that out?


  • Posts: 141
You can make a death animation for the actor that is just a single frame, or the complete animation that it had before, but without the looping (so it stops on the last frame of that animation rather than looping it back). If the actor could have one of several possible animations at the time of death, you can make a copy of each of those animations, remove the looping and then check when they die which animation they have and play the appropriate death animation.
Programming equivalent of Jack-of-all-trades


  • *
  • Posts: 730
I had a similar problem with a number of actors that I needed to run animations in reverse on. I ended up putting each frame in a different animation and numbering them, then incrementing the frame myself.

It would be great if stencyl had a pause animation and/or reverse animation block.


  • *
  • Posts: 1385
+1 on what twotimingpete said.
That works very well!


  • Posts: 504
+1 to Jeffery. Image API maybe best for this.

Upon death, create instance of image of self at position.
Kill self.
Fade instance.

Hope it helps.


  • Posts: 166
+1 on two twotimingpete.............just do that and set opacity to an increasing number for actor and after 1 second kill that actor................


  • *
  • Posts: 2716
It would be great if stencyl had a pause animation and/or reverse animation block.
Suggested now in the Issue Tracker:
I'm spanish, excuse me for my bad English.
I'm not a private teacher. Please, post your questions in the public forum.


  • *
  • Posts: 730
This is a bit off track, but, you could take a look at this extension  for the excellent spine (

I've been using Spine to create animations - exported as png sequences (I'm using the $69 version), but now with this extension, you can animate all your character movements, including things like fades/etc and just call them with a block. 

Movements can even tween into each other, (eg a run into a slide). Obviously, you also get the advantage of saving memory as the animation is skeleton based.


  • *
  • Posts: 14
(Sorry if this is necro, but wasn't sure if it was useful to make a new post for this?)

It's possible to set the duration of a specific frame (under Actors->Draw->set duration of frame)To pause an animation, you can set the frame to a very long duration. Works for my situation, hopefully this helps!