More Signal Questions

Godot 4.3

Hi everybody!

I have more signal questions and problems.

I need to connect a signal with a target but because of circumstances I would like to do it actually from the emitter but not at the target. Can you remotely tell a node to connect? Basically use code at the emitter to make the connection, given the callable etc. is in the script of the the target?

How else would I make the connection if the target does not know which signal is meant for it?

Thx.

use event bus signaling

you just need a global script that actually hold all the signal, and any node that requires it will only need to hear from the event bus and .connect / subscribe to it

If you have a reference of the node you want to use, yes, but your case don’t look a case for use signals, i think groups and get_tree().call_group() will be more appropriate.

Thx, I have made some progress and I’m working with signals and groups.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.