How to play full step animation only once

I made a sprite where a person is dying. The animation is 8 frames long, so if the game is running at 60FPS, in 40 frames the animation is shown completely, so it usually works well with this:


Step animation is ON -> Wait 40 frames -> Step animation is OFF.


But, whenever the game gets a bit laggy, the amount of frames of the animation shown vary, so sometimes the animation stops with the character mid-air or it loops and the character "revives". What can I do to make sure it won't depend on the current FPS? Is there a script like "showframe(1); wait(5 frames); showframe(2)..." so I can animate it manually? Or maybe there's a DeltaTime function?


Thanks in advance.
This is probably not going to be the perfect solution, but I've found that it's easier to set up animations with the "turn" command:


animate.png


You essentially use the turn command for cycling through the different frames, then switch between images/characters if you need to display more frames. The nice thing about this set up is that you have absolute control over how long the animation displays for, whether you use all the frames or skip through some for a short version, etc. But there are only 4 directions, which limits you to setting up multiple character sheets and changing images for longer animations.


(Apologies if you already knew this, I figured I'd bring it up anyway).
Unfortunately we need more info from you before that can be answered, because either you don't have 8 animation frames, or don't use the stepping animation, or have a plugin that adds more than the default 3 frame step animation.


If you have a plugin for 40 frame animation, then a lot depends on how that plugin works - which means we need a link to it and this is Plugin support, not general support.


If you're using something else then you need to describe what exactly you do, because as said the regular stepping animation is a cycling 3-frame-sequence 1-2-3-2-1-2-3


That said, the usual way to do sprite animations is like the doors are done, with using turn command and waits to display different parts of the animation - make a quick door event and check how that is done.


EDIT: Ninja'd
This is probably not going to be the perfect solution, but I've found that it's easier to set up animations with the "turn" command:


View attachment 32280


You essentially use the turn command for cycling through the different frames, then switch between images/characters if you need to display more frames. The nice thing about this set up is that you have absolute control over how long the animation displays for, whether you use all the frames or skip through some for a short version, etc. But there are only 4 directions, which limits you to setting up multiple character sheets and changing images for longer animations.


(Apologies if you already knew this, I figured I'd bring it up anyway).

Oh, I knew this, but I didn't think about mixing two spritesheets together to get a longer animation, haha. This seems like the easiest solution! Thank you very, very much!

Unfortunately we need more info from you before that can be answered, because either you don't have 8 animation frames, or don't use the stepping animation, or have a plugin that adds more than the default 3 frame step animation.


If you have a plugin for 40 frame animation, then a lot depends on how that plugin works - which means we need a link to it and this is Plugin support, not general support.


If you're using something else then you need to describe what exactly you do, because as said the regular stepping animation is a cycling 3-frame-sequence 1-2-3-2-1-2-3


That said, the usual way to do sprite animations is like the doors are done, with using turn command and waits to display different parts of the animation - make a quick door event and check how that is done.


EDIT: Ninja'd

Yeah, I'm using Modern Algebra's Extra Movement plugin, but I think I'll end up animating it with the turn command instead of a step animation. Thank you very much for your input!

Original thread: https://forums.rpgmakerweb.com/threads/how-to-play-full-step-animation-only-once.57392/