Pulpscript Solution: Warping Between Alternate Worlds

My use case was actually slightly different, but say you want the player to be able to warp between two worlds. Also, the goal is to restore the player to their previous location when jumping. For the sake of this example, say these world are the past and the present.

First of all, set the initial location in the secondary world in the player's load event.

on load do
  past_room = "123_graveyard"
  past_x = 7
  past_y = 4
end

Next, create a couple of events to save values and jump.

on jump_to_past do
  present_x = event.px
  present_y = event.py
  present_room = event.room
  goto past_x, past_y in past_room
end

on jump_to_present do
  past_x = event.px
  past_y = event.py
  past_room = event.room
  goto present_x, present_y in present_room
end

Depending on how you structure your game, this code may live in the standard Pulpscript events. Mine does.