Add parameter to a child's contructor while create its group

I have a problem while create a group, that i want to add parameter to the children of the group. I logged the group, it showed that it was a list of children. But the next line i tried to interate them to set property for its child, the length of list = 0; I don’t know how to deal with this problem, so…

Thank you for reading this.

This is my code:

You wrote “bullets” two times :
bullets.bullets.getChildren()

I think this will be correct :
bullets.getChildren()

I’m so sorry for my mistake. But even when i try multiple of way to touch it(for, interate,getChildren,…) it keeps showing length = 0

I think first you need create members of this group, for example :
bullets.create(x,y,‘key’)
And then check length of this group or run interation.

1 Like

.getChildren() returns an array of the group’s objects.

Yes, you need to use bullets.create(…) or bullets.createMultiple(…) or add.group({ frameQuantity: … }).