Did you get a solution yet?
What you're going to want to do is use the store
and restore
PulpScript functions.
Whenever you change rooms, for example during on enter do
event, you will want to save the player's location to a variable for persistent storage:
store "varRoomLocation"
Before leaving the game, this information needs to be actually put into persistent storage. This happens when you change rooms or call an ending. So you'll have to make sure one of those 2 things happen before the player quits, otherwise it doesn't actually save it.
Upon loading the game, you will need to call the restore
function. You could do this in the game script's on load do
. This should now load the saved "varRoomLocation" into your current "varRoomLocation" variable. At that point, you need to send the player to that room. Such as goto x,y in varRoomLocation
This is just one way of handling it, but the important part is the store/restore pair of functions.