Transfering back to the same location in World Map

So I am trying to create this feature where the player use an item that teleport them to a camp map. That part works.

But when the player leaves, I want them to teleport back to the world map spot where they used the item. Is that possible? If so, how can I do it?
Just use three control variable commands to store Map ID, Player X and Player Y (those are options of Game Data) into three variables before the first transfer, and have the second transfer use the variables instead of a fixed target location
Can you show me an example?
Can you show me an example?
Alright, given that you said that getting to camp works, but returning isn't, I think it's safe to presume you know how common events work.

Go to the Common Event tab in the Database, start a new one. (Keep the old one in case it has text and whatnot that you don't want to copy over.

Create a Conditional Branch, make sure it has 'Create Else Branch' ticked. Set Switch to a switch named 'At Camp' to ON.
Next, go to under Else.
Go to 'Control Variables'. Set the Variable to one named Map ID. Operation: Set. Operand: Game Data: Other: Map ID.
Go to 'Control Variables'. Set the Variable to one named Player X. Operation: Set. Operand: Game Data: Character: Player: Map X.
Go to 'Control Variables'. Set the Variable to one named Player Y. Operation: Set. Operand: Game Data: Character: Player: Map Y.
Transfer Character to 'Map: Camp'.
Set 'Switch: At Camp' to ON.
This should transfer the player to Camp, the At Camp Switch should 'remember' that you are at the camp, setting up the 'If'.

Go under 'If'
Transfer 'Map ID', 'Player X', 'Player Y'
Set 'Switch: At Camp' to OFF.
This should return the player to their original position. The At Camp Switch should now 'remember' you are not at the camp, setting up the Else.

Please refer to the Visual Aids spoiler in case I'm unclear.
Spoiler: Visual Aids:



Excellent! Thank you so much, Diretooth! It works! 🙂
I'm glad it does.

Original thread: https://forums.rpgmakerweb.com/threads/transfering-back-to-the-same-location-in-world-map.76864/