MZ Forcing "Dying" motion when selecting a command

Hi, i've been having problems finding a consistent way to keep the "Dying" motion of SV battlers when selecting a command, let's say that my char have low health and the dying motion is active, all the other characters go with their turns, but when it's his turn it turns back to "Idle" motion while selecting the command, it goes back to dying after that, but for me, it simply doesn't look well. Is there a way to force that dying motion?
I guess it's the below method. You can put a conditional inside the first conditional that checks isInputting or isActing, to check:
if (actor.isDying()) {
this.startMotion("dying");
} else {
this.startMotion("walk");
}

Sprite_Actor.prototype.refreshMotion = function() {
const actor = this._actor;
if (actor) {
const stateMotion = actor.stateMotionIndex();
if (actor.isInputting() || actor.isActing()) {
this.startMotion("walk");
} else if (stateMotion === 3) {
this.startMotion("dead");
} else if (stateMotion === 2) {
this.startMotion("sleep");
} else if (actor.isChanting()) {
this.startMotion("chant");
} else if (actor.isGuard() || actor.isGuardWaiting()) {
this.startMotion("guard");
} else if (stateMotion === 1) {
this.startMotion("abnormal");
} else if (actor.isDying()) {
this.startMotion("dying");
} else if (actor.isUndecided()) {
this.startMotion("walk");
} else {
this.startMotion("wait");
}
}
};
I guess it's the below method. You can put a conditional inside the first conditional that checks isInputting or isActing, to check:
if (actor.isDying()) {
this.startMotion("dying");
} else {
this.startMotion("walk");
}

Sprite_Actor.prototype.refreshMotion = function() {
const actor = this._actor;
if (actor) {
const stateMotion = actor.stateMotionIndex();
if (actor.isInputting() || actor.isActing()) {
this.startMotion("walk");
} else if (stateMotion === 3) {
this.startMotion("dead");
} else if (stateMotion === 2) {
this.startMotion("sleep");
} else if (actor.isChanting()) {
this.startMotion("chant");
} else if (actor.isGuard() || actor.isGuardWaiting()) {
this.startMotion("guard");
} else if (stateMotion === 1) {
this.startMotion("abnormal");
} else if (actor.isDying()) {
this.startMotion("dying");
} else if (actor.isUndecided()) {
this.startMotion("walk");
} else {
this.startMotion("wait");
}
}
};
It didn't work at first, but it turns out it was due to an incompatibility problem with visustella, after a few edits it now works as intendet, thank you so much

Original thread: https://forums.rpgmakerweb.com/threads/forcing-dying-motion-when-selecting-a-command.181278/