MZ [SOLVED] Set Movement Route: Reset to the First Frame

I'm working on some longer animations for my game, so I'm trying to switch between multiple charsets and different frames. The issue I'm running into is that when I switch from 1 charset to another (or from 1 direction to another), it continues from the frame the previous charset left off on, making it randomly display frames out of order. For example, if the first animation stopped on frame 2, then it would continue the next on frame 3 instead of restarting on frame 1.

I used this tutorial and this forum thread for troubleshooting so far, but I haven't had any luck, even with the additional script call. I realize those are for MV, so I'm wondering if something changed in MZ that might be causing it to not function the same way. I referred to the Script call sheet, and it seems to say it's applicable to both MV and MZ, though.

Here's part of my event for a couple of the Set Movement Route animations:
1756796819861.png

1756796833512.png


This is the Event it's moving:
1756796985128.png


These are my Charsets:
1756797105409.png


And this is a visual GIF of what's happening (notice how when it switches to the second charset, it starts on the second frame instead of the first):


Does anyone have any ideas on what I might be doing wrong here?
Hi there!



I tried to mess with it using events once. Mess witht he pattern of the event. I found it kind confusing... If your character is moving or does have step animation(which seems to me that it has, since you checked the walking and stepping box on the event page), the pattern will keep updating according to animation count. I think it's hard to debug something like that with events.

JavaScript:
Game_CharacterBase.prototype.updateAnimation = function() {
    this.updateAnimationCount();
    if (this._animationCount >= this.animationWait()) {
        this.updatePattern();
        this._animationCount = 0;
    }
};

Game_CharacterBase.prototype.animationWait = function() {
    return (9 - this.realMoveSpeed()) * 3;
};

Game_CharacterBase.prototype.updateAnimationCount = function() {
    if (this.isMoving() && this.hasWalkAnime()) {
        this._animationCount += 1.5;
    } else if (this.hasStepAnime() || !this.isOriginalPattern()) {
        this._animationCount++;
    }
};

Game_CharacterBase.prototype.updatePattern = function() {
    if (!this.hasStepAnime() && this._stopCount > 0) {
        this.resetPattern();
    } else {
        this._pattern = (this._pattern + 1) % this.maxPattern();
    }
};

So I guess is better if this is handled by a plugin:

You can have more control of the pattern order the character will follow and also if it will keep updating automatically or not update at all. Hope it helps
Thank you for linking your plugin and creating one that makes animating easier!

I just tested the plugin out, and was super straightforward in fixing my issue. I appreciate your help with this! 🙂

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/solved-set-movement-route-reset-to-the-first-frame.179899/