More poses by Yanfly's Weak Enemy Poses

Hi
I am using static frontview enemies and I'm trying to make a way to change images when they are doing specific actions, like attack and guard. I'm using Yanfly's Battle Engine Core and Weak Enemy Poses plugins to do it. But I need help with notetags.
The example lunatic notetag from the plugin:

<Custom Enemy Pose>
if (user.mpRate() >= 0.50) {
name = 'Scorpion';
hue = 180;
} else {
name = 'Spider';
}
</Custom Enemy Pose>

I want to make it attack, but I don't know correct command.

It should be like that, but I don't know the command (I'm still learning JS)
"
if (user.action() = attack) {
name = 'Scorpion';
"
Thanks in advance
*Bump*
I don't feel like the Weak Enemy poses plugin is suited to your needs. I'm not super familiar with it, as I don't use it myself, but I think it will have some real troubles trying to draw specific battler images for events that happen over only a few frames and then changing back. Even if you somehow figure out what functions to call to get this to update when attacks are being used, it probably won't happen in a smooth way, and at best will look pretty janky.

If you're set on using that plugin, the best thing I can suggest is applying 'blank' states to the attacker during action sequences, and using those states to change the battler image (and remove them after) using this plugin.

ie: add an 'attacking' state to the battler during the action sequence before the attack animation, and then remove it after so many frames in the same action sequence, or in the finish section. But like I said, this will probably come out looking janky at best.

Animated Sideview Enemies is much better suited to what you're trying to do. Despite sideview being right in the name, the plugin works fine for front view too. Just make giant battler sheets for your enemies, and animate them like you would a player character. Hell, you could leave most of the frames static and only use the attack animations, or whatever too. It'll come out looking way better, and won't give you a headache trying to bend that weak enemy poses plugin beyond what it was made for.

Original thread: https://forums.rpgmakerweb.com/threads/more-poses-by-yanflys-weak-enemy-poses.111895/