- Joined
- Jan 10, 2016
- Messages
- 56
- Reaction score
- 337
- First Language
- Spanish
- Primarily Uses
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.
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.


