How to get houses to save my location after getting in/out?

I’m making a platformer game and while working on a town I wanted the player character to be able to go into the houses.

I made separate scenes for each house and made it so that when you press a certain button on the door you’d be teleported to the inside of that house.

Getting in the house works fine but when I get out of the house the original scene completely resets (coins, location, npc’s ect.)
Is there any way to save the state of the player and/or town?

hey its simple here’s an example
when going into the house here’s an event example :

and when getting out it’s simple to first of all create a global for the x and y position for the when the player exiting the house where you want him to be like this :

and in the other scene(the house scene )use this event’s

Thank you! This completely worked.

1 Like