I think I’m over complicating it but I have two scenes. One scene already exists in the world and needs to connect to a scene that is randomly spawned.
The randomly spawned object has a signal called “dialogue” when dialogue is emitted, the initial object that was already spawned has a “SetDialogue” function that needs to be called.
Whats the best way to connect the dialogue signal from the randomly spawned object to the SetDialogue method of the pre-spanwed object?
Whatever script you spawn the random object in, connect it there after you spawn it. If that script doesn’t have a reference to both objects you could emit a signal to a parent object that can reference both nodes to connect the signal
shatteredreality is right, the important part is having the reference to the right object.
The only thing I might add is that you can connect a signal from either object, as long as you have a reference.
As an example, you could do this:
SCRIPT OF RANDOMLY SPAWNED OBJECT
signal dialogue
func _ready():
existing_node = [[[make sure you have a reference to your existing node that has the SetDialogue function]]]
dialogue.connect(existing_node.SetDialogue)
EDIT:
just saw your reply. It would help if you could provide us your codue / node structure so we can help better.