MV Getting the Flinch Motion with Yanfly Battle Core Engine to Reverse at will...

I've got a unique situation where http://www.yanfly.moe/wiki/Battle_Engine_Core_(YEP) has the function of making the enemy/actor flinch on hit or move back on evade, but I need to reverse the direction at certain points. thing is my actors can move anywhere on the screen within set borders, and this means appearing on the other side of the enemy. I've more or less figured out A. how to flip actors/enemies, and B. get attacks to work with the flipped actors/enemies.

The thing I'm having an issue with is the flinching when hit and what not. I don't exactly know how to flip that without flipping it through the parameters, but that makes it ONLY do the reverse. I need to be able to control the option on the fly, if that's possible. I looked through the plugin and while I found some stuff for flinching, I don't quite get how it works in order to change it at will.
Is there any way for you to run a position check on the enemy's side? Where they can check their current x position, the incoming actor's x position, and if the actors x is larger than theirs it means the actor is coming from the right of the screen and flips the flinch animation accordingly? It would require the actors and enemies to store their positions into separate variables at the start of the action's animation so it can properly call those later
yeah actually, this plugin I found https://plugin.fungamemake.com/archives/11505 does the hard work for me. no variables needed, just script calls to get everyone's position. that's actually how I figured out how to flip people depending on what side of the screen they're on. the problem is I don't know what the code is to change flinching based on the same parameters as what I'm using for the other side switches. I found some code in the plugin, but I don't know what I need to change.

Original thread: https://forums.rpgmakerweb.com/threads/getting-the-flinch-motion-with-yanfly-battle-core-engine-to-reverse-at-will.152320/