Unload Scenes without cancelling the changes

Godot Version

Godot 4

Question

Hi guys! So I’m having a this problem, there is this “key code” scene where there is a number pad where I must put a number to progress, how do I make it so that it doesn’t unload my “house” scene?
I need both scenes to be loaded at the same time so every change made in the house remains saved when I exit the numpad screen.
Sorry if it’s a dumb question but I’m still kinda new to this.

You could add a scene to the tree root by get_tree().root.add_child(your_scene_instance), if the keypad is a user interface I’m sure you could overlay it on top of paused gameplay through this.

It may also be a good time to look into save systems!

1 Like

Both good idea thanks!
I managed to do it in a dumb way (that I won’t change as my game jam is due in 2 days and I don’t want to mess up)
I have a miniaturised version of the keypad in the house on a wall (both estetic and useful) and a Global variable that prevents it from being used until I get in an area2D that makes it bigger and usable.
I might make it so that it appears by pressing a key in the area, but I failed doing so as I forgot that on_body_ entered and exited are functions I can recall in _process
I’ll try in some time.
Thanks again.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.