Storing Map location as variable to return to same spot from different location?

Trying to see if there's a way with variables (or otherwise, but I imagine variables is the best way) to store my current location. Then, transfer to a new location, and return back to my previous location where I stored those variables. Here's an example for context.

I'm scouring the overworld map for treasure or dinosaur bones, whatever. I want to open my menu and select a custom option "Dig for treasure" This will first store my location as variables, then take me to another map (my location, but not on the world map). When I am done "Digging" for treasure, I want to exit the map. When I move to the edge of the map I would use the transfer player "designation with variables" option to return me back to my original spot on the world map before I started digging for treasure.
The game data option in the "control variables" command should include player map ID, X and Y coordinates.
MV has a thing in event > set variable > game data > player location. requires setting 3 variable with event.
map id, X position, Y position. then the warping would be a common event that uses those 3 variables as transfer coordinates.

pretty sure vx has same event option for this. but i myself cant be certain since i dont have vx
Yep, I actually figured it out right after I posted it. Sorry for the post guys >.< this can be closed.
report your first post and let the mods know your question has been answered. They'll close it for you.
I'm here now anyway, so I'll close it, but yes next time report your post please.

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/storing-map-location-as-variable-to-return-to-same-spot-from-different-location.125876/