MV user.clearActions() in Yanfly Buffs & States Core Plugi breaks the game

Hello, i have an error and i dont know why.

im using Yanfly Buffs & States Core Plugin to recreate a simpler version of the paralysis effect from their page that looks something like this:

Code:
<Custom Action Start Effect>
var paralyzeRate = 0.25;
if (Math.random() < paralyzeRate) {
  user.startAnimation(64);
  user.clearActions();
  var logWindow = SceneManager._scene._logWindow;
  if (state.message3) {
    var msg = '<CENTER>' + user.name() + state.message3;
    logWindow.addText(msg);
  }
  BattleManager.actionWaitForAnimation();
  logWindow.push('clear');
}
</Custom Action Start Effect>

but it crashes my game right at the enemy's turn.

1715485587364.png




After many tests, i found that THIS line is the one that breaks the game:
Code:
user.clearActions();

I tried to replace that line with another call to force the user to use a "End Turn" Skill but that also didnt work:
Code:
Code:
BattleManager.queueForceAction(user, 8, -1);


Im not using Battle Engine Core plugin but i dont think that would affect this code
Im not using Battle Engine Core plugin but i dont think that would affect this code
Have you tried with it? The Tip & Trick you're referencing lists the Battle Engine Core as a requirement.
Im not using Battle Engine Core plugin but i dont think that would affect this code
BattleManager.queueForceAction is a function provided by by the Battle Engine Core, so that wouldnt work without it.

are you sure you arent missing any required plugins for ones you are using that may be altering
Game_Battler.clearActions()
are you sure you arent missing any required plugins for ones you are using that may be altering
Game_Battler.clearActions()
Well, the error is happening after clearActions() when it tries to continue processing the action that no longer exists.

The Battle Engine Core does overwrite startAction() which is the last thing referenced in the error trace.
Have you tried with it? The Tip & Trick you're referencing lists the Battle Engine Core as a requirement.
yup tried with that plugin and now works and sadly that is a problem because the Battle Engine Core makes another plugin that im using not working correctly, LL_StantingPictureBattle.js (reason why im not using Battle Engine Core)

So ill need to find a another way to skip turn with another call or script.

​

I dunno what that plugin does, and Googling its name doesn't come up with anything.

But if you make a thread describing how it conflicts and asking for help (making sure to provide a link), you may be able to resolve the problem.
yup tried with that plugin and now works and sadly that is a problem because the Battle Engine Core makes another plugin that im using not working correctly, LL_StantingPictureBattle.js (reason why im not using Battle Engine Core)

So ill need to find a another way to skip turn with another call or script.

​

What does that plugin do? There may be an alternative you could use that would allow you to use the battle engine core
What does that plugin do? There may be an alternative you could use that would allow you to use the battle engine core

thats the link (its in japanese)

But ill follow ATT_Turan advice with another thread with more details because as far i know there is no other alternative for that plugin.

thanks for the help!
ah, forgot that makeTargets was a Game_Action method. I was wondering why the battler it was running on wasnt found thinking that it was a battler one

@SnakeBD
although, wouldnt you just be able to use the default engine's pair of script commands to queue up a "Paralyzed!" skill that does nothing instead of trying to use battle engine core's queueForceAction or just removing all queued skills? theyre in the forum's script call list
ah, forgot that makeTargets was a Game_Action method. I was wondering why the battler it was running on wasnt found thinking that it was a battler one

@SnakeBD
although, wouldnt you just be able to use the default engine's pair of script commands to queue up a "Paralyzed!" skill that does nothing instead of trying to use battle engine core's queueForceAction or just removing all queued skills? theyre in the forum's script call list
well, found the script command in another page to force the user to use a skill that works.

Code:
user.forceAction(8, -1);

thanks everyone for your help here

Original thread: https://forums.rpgmakerweb.com/threads/user-clearactions-in-yanfly-buffs-states-core-plugi-breaks-the-game.168592/