Help with teleporting back to where you were

Apologies if this has already been asked, but I made an item you can use that teleports you to an area, and in the area, there's a portal that allows you to go back to where you used the item. The only issue is, I can't figure out how to get the precise data for where you used it, instead of just the map id. How would I go about getting precise map data into a variable?
exactly the same way - you just change game data from the default map ID to Player X coordinate and Player Y coordinate, and you need three different variables to store the three numbers.
I like this idea!
I would suggest using 3 variables
Control Variable, set to game data Other , Map ID
then:
Control Variable, set to game data Character , player Map X
and another for
Control Variable,
set to game data Character , player Map Y.

If you try to use Get Location Info it will only capture data from the event that calls that function and will not work in a common event.
Sorry for repeat answer!
What you need is:
- 1 variable for Player X coordinate
- 1 variable for Player Y coordinate
- 1 variable for Map ID
Then trigger the teleport function with these 3 variables to bring your character back to where he was.
Thanks, this worked!

Original thread: https://forums.rpgmakerweb.com/threads/help-with-teleporting-back-to-where-you-were.149850/