Object Names and Lists

If I had a script asking for objects that are in the list of children of the owner, and it called for specific object names, would spawning that owner with the children mess up the names and not work?

Thanks

Kind of hard to follow your question there. What do you mean? Could you post an example of code?

Let’s say I had the heirachy:

Object1 -> Child1 -> Child Child
---------> Child2

And I used an addObject Actuator to spawn Object1.
The children would be added, and their names would be correct.

You can find children based on names for added objects.

As long as you do not dynamically parent, the children should have unique names (within the children’s list not within the scene objects).

Does addObject make the spawned objects’ name change? Say on a hidden layer there is in object named ‘man’. If I spawned it in the active layer, would its name change to ‘man.001’?

It’d just be “man”.
addObject literally adds a copy instance of an object in a different layer. I think the only thing that changes when you add an object is the code reference and the object’s location in memory. Hence, that’s why I am able to access a specific “cloned” object and change its values without changing all the other objects’ values.

It’s like instantiating two identical objects in any programming language I guess.

No, the names remain (resulting in non-unique names within scene).