I create a path from Left to Right for a short distance. When the player hits the enemy, in the player collision with right side of enemy/script editor, I'll createPath for the player to respond to when hit on the left side by the enemy, to start the path so the player goes to the right.
Then be sure to add Path Finish in the player, and in that script editor, createPath (none) would be the way to stop the path.
You can add sound, animation also as needed, and may have to reference the draw actor event if necessary, with some variables like "hurtR" or "hurtL" depending.
I don't have the coding here, but that's the general idea. I hope that helps, even if it's 5+ years later.