I think the better way to make it is setting the Player X and Y everytime he touch the doors.
Don't forget to make save points and set the initial position each time the player save, or, set to save his position when he save the game (can be trick, if the player is near to die and save).
The mechanic behind it is strict like Game Maker, Indie Game Maker and RPG Maker.