Knowing animation time

Is there a way to know exactly how much an animation (the effekseer kind) last?
I tried to look in the editor and in the JSON but didn't find anything useful 🙁
You could open it in the Effekseer tool and check its settings?

If you want to measure how long an animation takes, you can just use Wait for Completion on the animation, then have a Parallel event do +1 to a variable every frame until the animation is done.

Otherwise, if you want to know before it plays, at runtime, then that might not be possible as-is: I suspect the "Destroy after time" trigger information is not exposed outside of the compiled WASM module. I skimmed the JS/TS and the only trigger-related thing I found was sendTrigger. Might've missed something, though.
I opened some in Effekseer but I don't understand what the "timing" is. For example the first I opened has 160 in the timing bar, I guess 160 frames, but not sure how to turn it in timing.

My plugin calls animations but I need it to wait for the animation to be finished, I tried to do a loop with SceneManager._scene._spriteset?.isAnimationPlaying?.() but is quite flawed, was trying to find a better and more stable way
I opened some in Effekseer but I don't understand what the "timing" is.
Yea, I'm not sure what that is either. Maybe some kind of render time measurement. 😴

My plugin calls animations but I need it to wait for the animation to be finished
Oh, that should be easier! 😂

If you're using the standard $gameTemp.requestAnimation method to play an animation on a Game_CharacterBase (player, map event, etc) then you can check using the character's isAnimationPlaying method, e.g.
JavaScript:
$gamePlayer.isAnimationPlaying()
That's how the core engine tracks "Wait for Completion" on animations. 👋

If you need something similar for use with battle sprites or such, you can try defining startAnimation, endAnimation, and isAnimationPlaying methods on Game_BattlerBase, mimicking the ones on Game_CharacterBase. The start/end methods should be called automatically by the core scripts (duck-typed), allowing you to check battlers the same way as map characters.

Otherwise, Sprite_Animation has an isPlaying method, so if you have a reference to the sprite then you can just check that directly, e.g.
JavaScript:
myAnimSprite.isPlaying()
Yes I play animations on player or map events!
Thanks I'll try that! What would you use, a while loop? I'm worried it might freeze the code, maybe a interval?
I would hook into an appropriate method. Most game objects have an update method that gets run each game frame, e.g. you could patch the update method of Game_Map:
JavaScript:
void (() => {                                          // IIFE for local scope
  const alias = Game_Map.prototype.update;             // store original method
  Game_Map.prototype.update = function(sceneActive) {  // redefine method
    alias.apply(this, arguments);                      // invoke original method
    // your code goes here!
  };
})();
Thanks! I'll try this way 😀
Good luck! 👋

Original thread: https://forums.rpgmakerweb.com/threads/knowing-animation-time.161051/