MV Is there a way to prevent action effects from changing or even starting a motion effect?

Hi all.
I'm using action sequences and YED_sideviewbattler and have one issue.
I've made a few custom motions/animations for when my character receives damage and it works fine for single hit attacks because I just put the "custom motion damageType1: target" after the action effect but when I have attacks that hit multiple times I'd like to use a continuing motion/animation rather than reset it every time the action effect is called.
So I'm looking for a way to have damage not activate a motion at all and then manually call them for every attack.
Is there a plugin that plays well with the yanfly series that will help with that? I can also look into changing the base code if needed but I'm very new to coding so a lot of it is well beyond my understanding.

Any help/advice you can give would be greatly appreciated!
This should do what you want. Paste it into a text editor, save as a *.js file, include as a plugin.

Code:
Game_Actor.prototype.performDamage = function() {
    Game_Battler.prototype.performDamage.call(this);
    if (this.isSpriteVisible()) {
//        this.requestMotion('damage');
    } else {
        $gameScreen.startShake(5, 5, 10);
    }
    SoundManager.playActorDamage();
};
This should do what you want. Paste it into a text editor, save as a *.js file, include as a plugin.

Code:
Game_Actor.prototype.performDamage = function() {
    Game_Battler.prototype.performDamage.call(this);
    if (this.isSpriteVisible()) {
//        this.requestMotion('damage');
    } else {
        $gameScreen.startShake(5, 5, 10);
    }
    SoundManager.playActorDamage();
};
Thank you but unfortunately what happens is it resets the motion to walk/idle now rather than the damage motion. So my animated motion starts but as soon as the next instance of damage happens (1 frame later) it stops and resets to walk/idle.
My sequence looks like this if it helps:
<target action>
custom motion ldmg: target
while ($gameVariables.value(3) > -1)
CHANGE VARIABLE 3 -= 1
action effect
wait: 1
End while
</target action>
Note: I have an extension plug in that adds loop capability to action sequences.
This thread was moved from RPG Maker MV Support to JavaScript/Plugin Support.
Alright, then try this. Open Battle Engine Core, and change line 3206 to read
Code:
    } else if (!$gameSwitches.value(42)) {
replace 42 with the ID of a switch you have available.

Then before your while loop, turn on switch 42, and turn it back on after. See how that goes.
Alright, then try this. Open Battle Engine Core, and change line 3206 to read
Code:
    } else if (!$gameSwitches.value(42)) {
replace 42 with the ID of a switch you have available.

Then before your while loop, turn on switch 42, and turn it back on after. See how that goes.
Thank you. I’m just going to bed so I’ll have a look in 8 hours when I wake up. I really appreciate the help so far by the way. I’ll let you know if it works or not when I try it.

Alright, then try this. Open Battle Engine Core, and change line 3206 to read
Code:
    } else if (!$gameSwitches.value(42)) {
replace 42 with the ID of a switch you have available.

Then before your while loop, turn on switch 42, and turn it back on after. See how that goes.
So with this in my target action I see the first frame of the motion but then it switches back to walk/idle:

```<target action>
custom motion ldmg: target
change switch 220: on
wait: 1

while ($gameVariables.value(3) > -1)
CHANGE VARIABLE 3 -= 1
action effect
wait: 1
End while

wait: 30
change switch 220: off
motion walk: target
</target action>```

and I replaced line 3206 of the YEP Battle engine core with this:
```} else if (!$gameSwitches.value(220)) {```

So unfortunately not working. I increased the first wait to 30 for one test just to make sure the motion was still acting correctly and it was so I think the action effect is still interfering. I'm happy to keep trying things if you have other thoughts as well?
Alright, then try this. Open Battle Engine Core, and change line 3206 to read
Code:
    } else if (!$gameSwitches.value(42)) {
replace 42 with the ID of a switch you have available.

Then before your while loop, turn on switch 42, and turn it back on after. See how that goes.
Hi ATT_Turan. I was just wondering if you’ve had another chance to give this anymore thought?
Sorry, no.
cool. I just wanted to say thanks for your help anyway. I appreciate it.

Original thread: https://forums.rpgmakerweb.com/threads/is-there-a-way-to-prevent-action-effects-from-changing-or-even-starting-a-motion-effect.173390/