Ah.. I used this in one of my games. It's a bit tricky and it will require a lot of testing.
The more simple approach is to make an event for every location in which the enemy could "spot" the player. Make this event "On player touch" and set the required variable to something like "Event2FaceRight" or whatever. Then make a conditional branch with the required set "Event [EVENTID] is facing [DIRECTION]". Put whatever you want after this. Something like a message popping up and a game over screen or make the event chase the player with "Move towards character".
The only problems with this is it's VERY redundant and has a margin of error by about half a second meaning. This is usually accounted for by human reflexes but someone could move at the wrong moment and get busted before they should have. It's not noticeable to all but the most acute gamer, although.
I'd be interested if someone has a better system though of. My skills with events are pretty good but I'm not so-called "Masterful".