Zombie Objects

So I know about the removeParent function but is there anything like that but it unparents all the children of the object? I can’t find anything online about this and it’d be really helpful if it existed

EDIT: I solved the problem about removing the parent, but now when I unparent the child it doesn’t recognize that the object has children because it considers them zombie objects. It isn’t a zombie object when i unparent it in the editor and then find it with scene.objects, but once I parent it it becomes a zombie object. Any ideas?

I found a work around if there isn’t, because I don’t think there is

Could you create a list of children and for each entry unparent? You could also try childrenRecursive too:

http://www.tutorialsforblender3d.com/BGE_Python/Game_Logic/GameObject/GameObject_childrenRecursive.html

obj.children and obj.childrenRecursive are lists. just go


for child in obj.children:
    child.removeParent()

that unparents all direct children.
Zombie object happens when you try to access an object that does not exist anymore. Just make shure you do things in order. Objects with obj.endObject() exist until the end of the frame, after that all references to them throw errors.

Hm. Ok, it’s still there when I reference it, its only when I parent it that it becomes a zombie object