MZ Changing a Player's Battler or Walking Sprite

Im trying to create something that will change an actor's walking sprite only when they are dead. Which i am currently using a common event. However, this has a few issues. 1. it creates lag, 2. it changes all three actor images which is problematic because i have an event that calls on these when changing weapons. Is there a script call i can use that will change only the walking sprite and only the battler on an actor?

Thanks.
Here's the Change Actor Images example from the MV / MZ Script Call List:

// Change the party leader's images: // Map character: img/characters/Hero.png, index 0 (top-left) // Face: img/faces/Hero.png, index 3 (face #4) // Battler: img/sv_actors/Hero.png var actor = $gameParty.leader(); actor.setCharacterImage('Hero', 0); actor.setFaceImage('Hero', 3); actor.setBattlerImage('Hero'); $gamePlayer.refresh();
As you can see, the map character, face, and battler images are all separate script calls. You can just omit the one(s) you don't need.

The "lag" you mention might be caused by setting the image every frame. You can avoid that by using a switch, e.g. turn it on when the image changes to "dead", and off when it changes to "alive". This lets you skip changing the image if it is unnecessary. Example:

◆If:Reid is affected by Dead ◆If:reid dead is OFF ◆Script:$gameParty.leader().setImage('$reid-dead', 0); : :$gamePlayer.refresh(); ◆Control Switches:#0016 reid dead = ON ◆ :End ◆ :Else ◆If:reid dead is ON ◆Script:$gameParty.leader().setImage('reid', 0); : :$gamePlayer.refresh(); ◆Control Switches:#0016 reid dead = OFF ◆ :End ◆ :End
(This assumes Reid is always the party leader.)

Optimally, you would only call the event when the player dies/revives, to avoid having it running constantly in the background.
Thanks very much for this!

EDIT:
I did manage to add a Common Event call to when a character dies so it will trigger the change and a common event to all revives to change the sprites back. So just event calls and no parallel processes, yay!

Now all the party has ghost form when they are dead while on a map and the basic dead sv when in combat.

Thanks again!
Great! Happy RPG Making~ 😂

Original thread: https://forums.rpgmakerweb.com/threads/changing-a-players-battler-or-walking-sprite.151144/