Custom Signal Between disconnected scenes

Godot Version

Godot Engine v4.2.2.stable

Question

Hello everyone,

In my game there is a team selection scene as starter, and there are two buttons that when pressed sets the team and changes a boolean variable to true, so i can change scene. And in here i emit a signal with parameter selected_team.

There is a photo of what i described down below. Hope you can see it.

And then i go to my main scene where player and enemies exist. I am trying to receive the signal i send but i could not make it work properly, I guess i connect it because when i put “connect” line in _process function it keeps telling me that it is already connected. Anyway i am sending the merged photo that contains the two scripts what i mentioned

And to emit and connect this signal i am using a singleton that i autoload. and it just includes these two lines:

extends Node

signal team_selected(selected_team)

Can you help me out here? I’ve tried some stuff but i couldn’t resolve the issue.

Important Note: These scenes (first_scene and character scene) does not share a parent node, they are seperated scenes.

Hi!
You should connect to the signal in the _ready function. Otherwise, if you connect each time _process is invoked then there will already be a connection from the second frame forward.

Yeah, I know I just tried it to see what happens and it didn’t work. Expected really. Do you have any suggestions on the problem? Why it does not work? Should i make them have a common parent?