MZ Change sprite. Transformation of the character - enemy.

Hello. Is it possible to somehow change the character or enemy sprite depending on their HP?
For example, when there are 50% HP left, the boss changes the sprite and turns into something else.

I found in the list of script calls there is this:
enemy.transform(id);
$gameTroop.makeUniqueNames();
// Transform enemy #1 (index 0) into enemy ID 8
$gameTroop.members()[0].transform(8);
$gameTroop.makeUniqueNames();

But as I understood from the example, you can only change the ID and name. Is there a command to change the sprite in battle?
no need for scripting

just make a troop event conditioned on enemy HP <= 50% and transform enemy

your de3scription is exactly what those options are for
Great thx!!!!
But as I understood from the example, you can only change the ID and name. Is there a command to change the sprite in battle?
Changing the ID changes the entire enemy to that ID. Its sprite, name, parameters, everything is always referenced by the ID.
Changing the ID changes the entire enemy to that ID. Its sprite, name, parameters, everything is always referenced by the ID.
Yes, I have already figured it out. I am only changing the sprite. Thank you very much for your help. I am very grateful to you.

Original thread: https://forums.rpgmakerweb.com/threads/change-sprite-transformation-of-the-character-enemy.171730/