MZ Eventing for Sprite Talking Animations

I'm trying to make a parallel common event to automatically change the Player's sprite to their talking animation whenever "Player" is put into the message bubble's name tag and to stop when the bubble is no longer being displayed.

The problem I'm having is that the Talking animation jitters because it keeps restarting itself over and over again due to the parallel event looping. I know fixes for that in theory, but I've tried every combination of Switches, Loops, Labels and checking if the message box is busy I can think of, all that ever accomplished is that the talking animation ignores the name tag and just plays permanently. I'd be grateful if a fresh pair of eyes could take a look at this.

I would also like to have this system work for NPC names, but I don't know how to change the sprite of an event based on its written name alone rather than its Event ID that's bound to a specific room which is what Set Movement Route requires. (I would never have two talking events of the same name in the same room anyways since I'm using the Smart Bubble plugin which also targets events based on written names rather than IDs.)
Don't know if I thought this through, but can't you just get rid of the first conditional and then put the change to walking graphic as an else branch in the second conditional?

And I didn't understand what was your problem with using the event ids to target the NPCs?
I think the script to do it is $gameMap.events()[0].setImage("Evil", 0);
If you want to find an event based on the name, I think the find is like:
const event = $gameMap.events().find(event => event.event().name === "NPC");
if (event)
event.setImage("Evil", 0);
Don't know if I thought this through, but can't you just get rid of the first conditional and then put the change to walking graphic as an else branch in the second conditional?

And I didn't understand what was your problem with using the event ids to target the NPCs?
I think the script to do it is $gameMap.events()[0].setImage("Evil", 0);
If you want to find an event based on the name, I think the find is like:
const event = $gameMap.events().find(event => event.event().name === "NPC");
if (event)
event.setImage("Evil", 0);
My problem is that the list of Event IDs you select from on Set Movement Route targets rooms and my rooms just aren't done yet. If you have an event call a movement route/change Image for an NPC event other than itself or the player in a debug room and you want to relocate that event to a new room in the final game, all movement route event commands (in my case animations) will break even if there is another event with the same NPC name in the other room because the IDs don't match anymore, so the engine no longer knows to target that event. Find event could perhaps work around that, I'll try it out once I got the basics working.

Original thread: https://forums.rpgmakerweb.com/threads/eventing-for-sprite-talking-animations.182894/