Random Maps: Jump to Version 3.0 Upgrade Guide!
Need a break from exploration? You quickly need some items from the village, but you want to return right there? No problem, let’s create a teleport device for the player.
Our teleport device will handle…
- Memorizing the position inside the dungeon
- Let the player emergency escape to their base
- …and return to their save point
The Common Event
Create a Common Event and give it any name, e.g. „Return Item“ or „Teleport Device“.
In general, we have 3 cases:
- The player is inside a dungeon:
Memorize their position and transfer them to any map (preferably their base). - The player is outside any dungeon and has a save point:
Ask the Player whether they want to return, and if so, transfer. - The player is outside the dungeon but has no save point:
Tell the Player there’s nothing to do right now.

This is a very short version of this Common Event, of course, you can extend it with Message Choices (Do you really want to escape?), animations, sound effects, and more!
Let’s go through, step by step.
Check whether the player is inside a dungeon. You can put this script line into a Conditional Branch to query this information:
RandomMaps.isInDungeon()

Check whether the player has a memorized return point. Again, we do this by a script line in a Conditional Branch:
RandomMaps.hasSavepoint()
Memorize and Return
MV
Use this script call to memorize:
RandomMaps.makeSavepoint()
Use this script call to return:
RandomMaps.returnToSavepoint()
Clear save point:
RandomMaps.clearSavepoint()
MZ
Use the Plugin Commands.

The Item
RPG Maker lets you easily create items that call Common Events from the menu.

That is just one way to do it; there are many other ways to call Common Events in RPG Maker!