Help for Animated Sideview Enemies (Resolved)

Hello,
I'm using Yanfly's Animated Sideview Enemies plugin, which allows me to animate my enemies with image files located in the sv_actors folder. The enemies are therefore animated just like the actors.

My problem is that I want to change an enemy's appearance during combat. I've found a few ideas on the forum, but nothing that takes into account that my images are in sv_actors.

Does anyone have any ideas? A script call would be the best solution for me since I'll probably use this method on several enemies. But if another solution exists, I'm all ears.

I'm not very good with JavaScript (and apparently ChatGPT too), so if someone could help me, that would be great.
Thanks for reading! ^^
You'd use the same transform enemy event command like you'd use with any regular enemy. Whether or not they're animated SV ones doesn't matter.
Thank you for your reply. But what I'd like is to change an enemy's appearance, not transform it.

Transformation isn't a bad idea in itself, as it preserves HP, status ailments, etc. However, it seems to cancel the current action, and I can't allow that. I have an enemy that can potentially change its appearance at the start of its turn, so unfortunately, that's not suitable.

Thanks anyway ^^
But what I'd like is to change an enemy's appearance, not transform it.
no idea if itll cause issues elsewhere, but you can overwrite the name of the sprite the enemy uses mid battle and it should update. if your spritesheet's name was "Harold.png" and you were changing the first enemy's sprite, you'd use
Code:
$gameTroop.members()[0]._svBattlerName = 'Harold'
in a troop event script command or wherever youre setting up their image change from
It's perfect. It seems to be working correctly ^^
Thank you very much.
Sorry for the double post, I'm not sure if I'm allowed to in this situation, but I unfortunately jumped the gun a bit by saying my problem was solved.

Robro33's solution works perfectly; the enemy's appearance is completely replaced by the new sv_actor.

The problem is that the enemy is now stuck in a single motion (the one in the fourth row, first column; I think it's the "Guard" motion).

I thought I could fix this myself, but I can't. Is there a way to "reset" the enemy's posture? Any other suggestions would be fine too ^^"
Sorry for the double post, I'm not sure if I'm allowed to in this situation, but I unfortunately jumped the gun a bit by saying my problem was solved.
it doesnt count as a double post unless both posts happened within 24 hours

The problem is that the enemy is now stuck in a single motion (the one in the fourth row, first column; I think it's the "Guard" motion).
just to be sure, have you tried it with just the animates sideview enemies plugin and whats needed to get it running? I gave it a quick look in my main project and i dont seem to have this issue.
Thanks for your reply. After several tests, I realize it was due to a mistake on my part. I blamed your script when it's perfect, sorry ^^"
The mistake I made has nothing to do with the script; it's just a coincidence that it happened to the enemy using it.
Thanks again for your help =)

Original thread: https://forums.rpgmakerweb.com/threads/help-for-animated-sideview-enemies-resolved.181440/