Alright well, I have a demo here you can use for this. But note that it only works while each the player and the event face up and that you're behind the event. Also, the event has to have Direction Fix checked ON. For some reason, XP likes to automatically have events face the player when it's activated by a player touch or action button, which would make sense if the action were to display a text, however, it's not...
I don't really see a use for this, but if it's for something like a Pickpocket system, you're better off finding one already made for XP. I've seen a couple around. There might be one in the event systems of XP.
Also, the demo has any kind of explanations you might be looking for in comments inside the event.