On my main scene I have a timer node, when it activates I'd like it to call a function within all my instanced scenes (under the main scene) I cannot for the life of me figure out how to do this. I have a signal set up for when the timer goes off, but I have no way of connecting to the instanced nodes to call the required function. I don't know what they're called (the instanced nodes), I don't know how to connect to them. I know there has to be a way around this, but I am struggling to find it
Trying to call a function within an instanced scene
- Best Answerset by how2k2how
Put them all in a group and then you can call a method on every node in that group using call_group
.
https://docs.godotengine.org/en/stable/tutorials/scripting/groups.html
Ahh! I was on the right path then, I just wasn't understanding the syntax. It works now, thank you good sir!