parenting problem

I have an object from another layer( we will call this main object) that i add to my scene This main object has another object ( this one we will call growing object) parented to it. Th growing object grows after a bit then falls off. Here is the problem, I need to add the growing object , but when i add it to my empty I cannot get it to parent to the empty using the parent actuator. Is there a way to make it work using lb?


As soon as you add objects, then their names are no-longer unique, and some logic bricks (track to, parent etc) cease to work as expected.
The only solution that I can see to this is to use python, where you can identify objects by things other than closeness (eg distance/location, size)

Or maybe, if I ready your question one way, you could parent it before you add-object it, and then add the parent.

The way i have it now is like this, I have the growing object already parented to my main object then i add to my scene and that works but only once, becasue when i add from the growing object again it just won’t parent


I think in this case Python is the way to go like sdfgeoff suggests, unfortunately.


here is a overly complex example



Grow.blend (447 KB)

So the growing thing is parented to the empty?
Then just add the empty, and it will add both.

It’s parented to the empty which is parented to my main object so when i try to add another growing object it works but does not parent growing object.
I should tell you that this is an older game I went back to it and started adding some more things so it’s 2.49 Maybe someone here knows of a 2.49 parenting script that I can use, by the way i do use 2.6 but i st
sarted with 2.49 so i have a few projects with that version

Blue printRandom That is not what i am trying to achieve I could make a quick blend but it would older version BGE


If I understand you right:

“main” -> inactive
“growing” -> inactive and parented to “main”

“empty” -> active - addObject a new copy of “main” (incl. “growing”)

When the copy of “main” gets added you get a copy of “growing” too which is parented to it.
The copy of “growing” will animate a growing animation and unparent itself after a while.

Is this right?

No, I uploaded a quick blend 2.49 it’s from an older sim I made. Here is what happens If Main object Cube is in scene with an empty parented to it I can add Cube.001(growing cube) from a layer to it and it works like it is supposed to it is parented, but if you download the quick blend you can see the problem. In this example both Cube and Cube.001 are in layers, (not in the scene) first add Cube pressing “1” key the cube spins then add Cube.001 (growing cube) by pressing"B" key. Growing cube is added but for some reason, maybe a bug it can’t be parented, I need it parented. Keep in mind in my sim I am using a growing object that is rigged.



ParentActuator.2blend.blend (136 KB)