Custom React Effect (Yanfly's plugins)

I'm trying to get my actors to perform a certain motion or skill through the <Custom React Effect> notetags but when I use the code I've written below it doesn't work. The skill in question causes the actor to pull up a shield and go into guard motion to block the attack. If there is some kind of way to use syntax to force an actor to change their motion to guard without forcing them to use a skill I would be content.

Link to plugin

if ($gameVariables.value(330) > 0) {

var skill = 102;

var target = -2;

BattleManager.queueForceAction(user, skill, target);

value = 0;

}

Edit: Just did some testing. The code I put works but for my action sequences(with the target set to The User) they don't work. At least for whatever reason they won't make the actor go into the guard motion but if I put something like, wait: 120, it works. Does anyone know why this happens?


<Setup Action>
</Setup Action>
<Target Action>
</Target Action>
<Finish Action>
motion guard: user
</Finish Action>

Original thread: https://forums.rpgmakerweb.com/threads/custom-react-effect-yanflys-plugins.83563/