check for the event location relative to the player:
ex = event.x
ey = event.y
px = player.x
py = player.y
rx = ex - px
ry = ey - py
if rx > 0, the event is to the right of the player.
if ry > 0, the event is down from the player position.
if rx = 0, both are in the same column
if ry = 0, both are in the same row.
now with that, check for facing direction:
if rx > 0 and player direction is 6, then the player is facing right.
if rx < 0 and player direction is 4, then the player is facing left
same for ry, 8 for up, 2 for down.
if you want a script implementation, look for the function turn_toward_character
it's basically the same thing.