FolioTier 3

return-to-map

Pop the location stack — return to the most recently-entered location.

Canonical example

goto bedroom
goto desk
narrate "You inspect the drawer."
return-to-map

return-to-map pops one entry off the runtime location stack and sets the current location to whatever was beneath it. The most common shape is a hub → sub-location → back pattern: the player walks into bedroom from the map, then into desk from inside the bedroom, then inspecting the desk wraps up and return-to-map returns them to bedroom.

Notes

  • Silently no-ops on empty stack. If the runtime hasn't seen a prior goto, the verb does nothing — no error, no jump, no exception. This matches Ren'Py's _return idiom inside call screen patterns where the call frame can be missing without crashing.
  • Pops one frame at a time. Multiple sub-locations stack conventionally — goto bedroomgoto deskgoto drawer builds a three-entry stack. Successive return-to-map calls walk back up the chain.
  • Resets currentLocation on an empty pop. When the last frame pops, currentLocation becomes null. The player is "not in a location" — a state typically followed by jump <scene> to a dialogue / cutscene.

See also

  • goto — push onto the stack
  • locations — the Locations subsystem