0 votes

Okay so I am making a level based game where each level is its own scene, but I decided to add in a new sound effect but now I have to go into each level and manually add the nodes for the sounds. Is there a quick way to do this or do I just have to add a sound player to every scene individually and rename it over and over? What I am saying is that I would like to know if there is a way to basically copy and paste a node from one scene into another without having to duplicate the whole scene.

in Engine by (31 points)

Okay so I just found out how to merge from scene which adds nodes from other scenes which is still useful and quicker since I would have to add it to each scene anyway. If there is a faster way to do this or a way to add the nodes to many scenes at once please tell me though.

2 Answers

0 votes

What worked best for me is to have an scene overarching all the levels. This scene (I call it Run.tscn because it represents a run through multiple levels) holds everything that should be consistent through the levels. This includes Musik (like in your case) or the player itself (so that the players stats don't reset when he changes a level).

If you progress to the next level, just free that level and load the next one. The musik and whatever lives in Run.tscn will stay the same. (you might have to set the players position to the entry of the new level).

by (50 points)
0 votes

as you commented, currently, merge from scene is the best option.
there's pending PR for copy/paste node on github.

https://github.com/godotengine/godot/pull/19327

but it seems to need rework.

by (9,796 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.