Running event before critical hits

Hi all...I'm feeling kind of frustrated over this, because I know this is something other people have inquired about, but all of the threads I've found in searching either didn't get resolved or don't achieve what I want.

I want to run an event (or execute Javascript) during an attack before the critical hit resolves. The specific goal is to have the acting party member move forward, have a dramatic fly-in picture pop up, then they swing their weapon and deal the critical hit.

I tried the Bobstah plugin for running an event on a critical hit, but that happens after the attack is resolved.

I tried using Yanfly Action Sequencing for it, but that doesn't seem able to know whether the attack critically hit until after the "action effect" command, which is also where the damage is displayed.

The closest I've come is to put the event on autorun with a switch condition, and turn the switch on in the damage formula if it's a critical hit, but that displays simultaneously with the attack animation and damage pop-up, as it doesn't know there's an event it should wait to finish (this is probably better than nothing).

I was also able to get that result using the Yanfly Damage Core steps, calling the event inside of the conditional where it determines the critical hit multiplier.

So...is there a way to achieve the effect I want? Have it run the event and pause the attack process until it's finished?
I think there was a script by victor sant that applied a state before crit, and shaz had a script for running common event when a state is applied. But both of those were for vxace. but it's at least a lead
I think there was a script by victor sant that applied a state before crit, and shaz had a script for running common event when a state is applied. But both of those were for vxace. but it's at least a lead
I appreciate the recommendation, but I feel like that would have the same result as above, where the code to add the state would have no way to know there's an event it needs to wait for, and I'd get elements happening simultaneously.

Original thread: https://forums.rpgmakerweb.com/threads/running-event-before-critical-hits.124267/