EightMan I haven't tried setting actions while comparing to an animation frame, but you can try adding a System - Every X.X seconds in event 30, try with somethin like 0.3.
Also, maybe you should try checking for the IsAttacking variable on all your movement events (5,6,7,8) and removing event no. 4. Besides, you are setting the IsAttacking variable on "W is pressed" and everything else to "X is Down", pressed and down are different.
I can't give it a try right now but, hope that helps.