How to unhide node in a different scene?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Zer0

How do i unhide/show a node that is in another scene? After the player completed a level I want something to appear in another scene, but I can’t figure out how. Does anybody know the answer?

Look into singletons and signals.

Make an autoload script and put in the signal you want to react to. Emit that signal when the player completed the level. In the other scene, connect to that signal with the name of the method that changes the visibility of the thing you want to show.

Bernard Cloutier | 2020-10-28 01:22

:bust_in_silhouette: Reply From: CharlesMerriam

It depends what you want.

If you mean, “Level is done, go back to the previous scene and continue my script”, then you want to use a signal and a yield statement. In your level.gd, you declare something like signal EndLevel and emit_signal("EndLevel"). In your main scene, you might yield(levelthing, “EndLevel”)` or you might connect the EndLevel signal to some routine which gets called when the signal is emitted.

If you are wanting to update a player record, you might look at singletons.