Set variables to event co-ordinates.

Is there any way to set in-game variables to the co-ordinates of an event (specifically one that it's page is being executed via autorun.) using a script call?


So, if I have an event on the map that is being executed, one game variable is set to the X coordinate of the event and another game variable is set to the Y coordinate of the event.
Basically that can be done by control variable using the game data option of that event command.


So yes, there is a script call that can do this if you really need to access that datab in a plugin, but if you simply want to load it into a variable anyway, simply select the event coordinates in the game data window.

Original thread: https://forums.rpgmakerweb.com/threads/set-variables-to-event-co-ordinates.64570/