MV Guard Motion of Animated Enemies...

So I'm using http://www.yanfly.moe/wiki/Animated_Sideview_Enemies_(YEP) for animated enemies, but I'm noticing a problem when enemies guard... They'll change to a damage motion instead of staying guarding. Now I've managed to get this fixed for actors through various means. Tho this https://forums.rpgmakerweb.com/index.php?threads/guard-motion-staying.140965/ seems better than what I was initially doing lol.

But it doesn't seem to be working for enemies. Is there anyway to get enemies to stay in a guard motion and not revert to damage when hit? Or is this supposed to work for enemies too and something is just wrong on my end?
Bump... still haven't been able to figure this out for some reason.
Or is this supposed to work for enemies too and something is just wrong on my end?
I haven't tried it (and I haven't worked with Yanfly's SV Enemies), but the code caethyril gave is attached to Game_Battlers generically, so unless Yanfly does something really bizarre, it looks like it should apply to animated enemies.

Have you tried changing which is lower in your plugin manager between this and the SV Enemies?
I actually got it working finally lol. though my methods were probably not the cleanest. basically edited
Game_Enemy.prototype.performDamage = function() to request the guard motion if the enemy had state 2 on them and it worked. I was doing this for actors too until I found the method above. tho I don't know why I couldn't get it to work for enemies. even after moving it around the plugin manager.

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/guard-motion-of-animated-enemies.151855/