Remembering last known coordinates

So I had an idea for a player to be able to camp, but am very new to variables. I made 2 items, one to transport you to the campsite, and the other to transport you to your last known location before using the first item. How would I go about making the second one remember your last known location pre-transport?
you need to set three variables before making the transfer with the first item, and then use those variables as the target coordinates for the transfer command in the second item.

The three control variable functions you need are

control variable : game data : other : map ID

control variable : game data : character : player : Map X

control variable : game data : character : player : Map Y

And in the transfer Player command, select "designation by variable" and select the three variables where you stored that information.
It works! Thanks!
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/remembering-last-known-coordinates.17335/