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.

asked Jun 6, 2019 in Engine by Dragon11705 (29 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).

answered Jun 12, 2019 by Kaligule (47 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.

answered Jun 13, 2019 by volzhs (9,464 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 How to use this Q&A? before posting your first questions.