How to detect when flipbook pass certain frame?

I create 2D slasher. When a player presses attack button, my main character first threaten (raise sword above the head) and then attacks. And while the hero’s doing the swing, the player can move him. Then, when the animation pass certain frame, the motion is locked and player can’t move the hero anymore.

(When the flow is going by “Ended” the motion is locked)

(How I check the animation pass certain frame. This is macro “CheckAnimEnded”)

But somehow my program pass the step of the swing. And when I press attack button, I can’t move the hero promptly.

The framerate in the flipbook is set 30 frames in second. When I set kinda 5 frames, everything works properly. How can I do this with high framerate?

Somehow when I debug it, the nodes “Flipbook length” and “Get playback position in frames” give me 0 value.

That’s something strange, because sometimes the state BlowGoing is and sometimes it isn’t. In video on youtube I show, how it works now.

(Blue text is current state. “BlowGoing”, “BlowWait” and “LockMotion” are boolean variables. When the text is red, they are true, when black - false)

It have to be: first, BlowGoing, then BlowWait and Lockmotion. But sometimes it doesn’t work so.