emit signal after a scene was changed

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

Hi i have a problem. How can i emit a signal after a scene was changed?
Can anyone help me?

:bust_in_silhouette: Reply From: lofi

easiest way could be on ready function

func _ready():
      emiter_node.connect("new_scene_is_ready", receiver_node, "_on_new_scene_is_ready")
      emit_signal("change_scene")

Thanks a lot. But in wich script do i put it?

Simon | 2021-02-02 17:52

it all depends what are you trying to do with it, but without further info i would say the scene’s parent node scrip its a good place

lofi | 2021-02-03 21:30