How do I get the location of an Event?

As the topic asks, how do I get the location of an Event?
Use control variables - game data (and then the correct parts) to load X and Y coordinates into two variables
Are you trying to do this in a script, or are you just using events?
I know this is an old topic but I'm still having issues with it, and it's a Script not an event.  I'm trying to find an Event via a Javascript.
Can you explain more?  What event are you trying to find?  If you're writing a script, what class are you modifying?  What method are you modifying?  How will this be called?  Can you show us what you've got already?


Reason for all the questions is that the correct method will be different depending on the way you've designed your script.
Those


$dataMap.events[EventNumber].x
$dataMap.events[EventNumber].y


return x and y coordinates of event with any EventNumber you specify.

Original thread: https://forums.rpgmakerweb.com/threads/how-do-i-get-the-location-of-an-event.52290/