If I play a new animation before the end of the animation, it will overlap with the existing animation. (I am playing animation on the map) I hope the existing animation will be deleted when I play the new animation. Is there a way?
MZ How can remove existing animation?
Javascript/Plugin SupportYou could try one of these in a Script command:
- Clear All Animations:
JavaScript:SceneManager._scene._spriteset?.removeAllAnimations();
- Clear Character Animation:
This is for the player. You can replaceJavaScript:// MZ, stop all ongoing animations on the player const spriteset = SceneManager._scene._spriteset; if (spriteset) { spriteset._animationSprites.filter( s => s.targetObjects.includes($gamePlayer) ).forEach( s => spriteset.removeAnimation(s) ); }$gamePlayerwith$gameMap.event(123)to target map event 123 instead.
Isn't there a box you can check with "Wait" on it when you select the show animation command? That'd make the first animation finish before starting a new one.
(edit: this one)
(edit: this one)
@Navas but the OP doesn't want to finish the animation, he wants to cancel it.
most likely because the original plays in a loop
most likely because the original plays in a loop
Thank you everyone!
It works very well. Thank you.
It wasn't what I wanted, but thank you for replying!
Great, happy RPG Making! 👋
Original thread: https://forums.rpgmakerweb.com/threads/how-can-remove-existing-animation.160293/