|Topic was automatically imported from the old Question2Answer platform.
I have many nodes which I want to connect to the same signal, but as said, it’s many and I dont want to do it manually.
I know some ways in gdscript like:
for child in parent:
but in my scene the nodes I want to connect is not the only children
for nodes in get_group....
but that way I should sign in a group to each of them, which is almost connect signals manually.
Could anyone help me?
You have various nodes in various places… and how do You expect editor to get into your mind and know which particular nodes You want to connect ??
You have to at least find some common feature all of those nodes share and which is characteristic for them. Are they in the same folder ? Do they extend one class ? Do they share childed nodes ? Are they created by one particular object ?
Perfect, you are right, I should’ve clear this first.
The common feature they have is: they are several instances of the same inherited scene.
I dont know if I got to be clear, but if I did, do you know a way to do that?
SubBut | 2022-03-21 12:28
This is lucky. This way You can connect manually original scene, and all its inheritants will become connected as well.
I used this scene in others scenes, and each of them would have a different comportament to the signal. But you gave me the idea to add the original scene to a group and then connect to the signal.
Thank you very much.
SubBut | 2022-03-21 22:29