Do it like this:
Condition:(Your hit condition)
Subevent: if player.x<enemy.y
SubSubevent: if player.x is >enemy.x-(distance)
Action: (your hit)
For the left side:
Condition: (your hit condition)
Subevent: if player.x>enemy.x
Subsubevent: if player.x<enemy.x+(distance)
Action: your hit
Hopefully i answered your question
Cryttexx
Edit: i understood it wrong. You must change every player.x to enemy.x and every enemy.x to player.x