How do I find a character's location on a map.

I want to get the player character to move to a specified location upon the completion of an event. 


The Problem: There is no way to know where on the map the player is going to be standing upon the completion of the event. So I need a way to make the character walk to the point on the map, without having to know where they are standing ahead of time.


Thank you for any and all help.
You could just fade screen out and transfer player to the spot you want them to be at.  But, to get the x,y coordinates you need 2 variables, control variables->game data->character radio button->player map x &y.
Code:
Script: $gameTemp.setDestination(5, 13)
Loop
  Wait 5 frames
  Conditional Branch: Script: $gamePlayer.x === 5 && $gamePlayer.y === 13
    Break Loop
  End
Repeat Above



Assuming you want the player to move to 5, 13, the above will set their destination then go into a loop that keeps checking until the destination is found.  As long as that's not in a parallel process event, the player should not be able to override the character's pathfinding until they reach that spot.


Replace 5 and 13 with whatever coordinates you want to use (need to replace 2 instances for each)

Original thread: https://forums.rpgmakerweb.com/threads/how-do-i-find-a-characters-location-on-a-map.66450/