How to get emit data from child?

Ok so I’m pushing a lot of the same subsymbol to a group. I want to use the emit from the subsymbol to know when things happen. This would work normally but because they have been pushed I’m having problems. If I use this code it works but that’s not what I want.

symbol.nodes.screen.child(1).on(“Block:Clicked”, () => {
// Runs when the Block:Clicked event occurs
console.log(“Block:Clicked!”);
});

Is there away to make any or all child?
I was thinking of making a loop but don’t know if it would miss the emit.
I will need to know the child’s ID that did the emitting for use elsewhere.

thought??

Steve

2 Likes

Hey @stevesanerd,

It sounds like what you’re looking for is the tagCall(…) function, which allows you to call a function on all objects that share a tag.

Hope this helps.

All the best,
Seb

1 Like