Send player to the location of a specific spawned event (MV, Yanfly Event Spawner) [RESOLVED]

Hey folks,

I am able to spawn an event (I will refer to this event as "Pinpoint" for clarity later) onto a map (with Yanfly's event spawner plugin) into one of several locations in a region. I need to be able to then transfer the player to that event's location.

The event "Pinpoint" is static; it will always have the same name and the same ID; there will only ever be one of it on a map. The map is variable; I will be using multiple different maps. The player is on the map where the event has been spawned; they have been put in the top left corner for the sake of being on the same map.

I would like to be able to do this using code in a common event, but if that is not possible, I can do this using a different event in the map to which the player is being sent. I'm thinking a potential solution is using the map specific event to identify the map ID and use some code (the main part I need help with) to get the X and Y of "Pinpoint" on the map, then use that information to transfer the player to where they need to go, but I am not sure how to write code to acquire the X and Y of a specific event on a non-specific map when that event did not start on the map.

If anybody on here can provide assistance, I would appreciate it. I am happy to provide further information if it is required.

Regards,

marbeltoast.
probably a better way but i can think of a trick for this.
make the spawned event spawn as an autorun event. this event will...
control variable : game data : character : this event : map X
control variable : game data : character : this event : map Y
control variable : other : map ID
and of course turn on switch or something to stop the autorun
then just use those 3 variables for the transfer
It could work. I'll give it a go and report back.

EDIT: This worked perfectly. Cheers, pal. I'll call for this to closed now.
Since you are using Yanfly Spawn, the event ID will change. (I had an issue with this when trying to do creative spawning mechanics via ID, I believe every new event spawned, the ID goes up by one, no it doesnt matter if an old ID is reclaimable)

Simply write a bit of code that would detect where the event is based on name, and store the events x and y in a variable and then transport the player to that location. It can all be in a common event (best place)
Thread closed

Original thread: https://forums.rpgmakerweb.com/threads/send-player-to-the-location-of-a-specific-spawned-event-mv-yanfly-event-spawner-resolved.132431/