How to add and remove child scenes
Hey Guys! First time asking a question here!
I'm working on a menu-based game where the player only uses his mouse to click on buttons. So I got a main scene with two child nodes. One of the children is named HUD for the character UI stuff like health and experience points. The second child is named World. I would like to always display the character UI while the scenes in the World node changes to for example Battle.tscn or Shop.tscn. I was thinking that the way to do this would be by adding the Battle.tscn to the World node when the player clicks on the battle button and when the player clicks on the back button or is done with the battle that the Battle.tscn should be removed and in it's place the Shop.tscn should be added. I have no idea how I should do this since I can't get the examples shown in tutorials to work. I'm also not sure if this is the way I'm supposed to do it since I'm still very new to these kinds of things.
If you guys have any solutions or advice for me how to do and handle this then that would be great!