Search or objects with parent = null

Avantar
01 Dec 2013, 17:44Last question for the week...
If you remove an object with RemoveObject(item), I believe that it is not destroyed, but merely sets its parent to Null.
How do I search for these items with a parent of null.
I have tried:
if (object.parent = null){ }
But it is not finding it.

If you remove an object with RemoveObject(item), I believe that it is not destroyed, but merely sets its parent to Null.
How do I search for these items with a parent of null.
I have tried:
if (object.parent = null){ }
But it is not finding it.

Pertex
01 Dec 2013, 19:37foreach (i, AllObjects() ) {
if (GetAttribute (i,"parent")=null){
msg(i.name)
}
}
but perhaps it would be better to MoveObject() the object into a dummy room then you can check all objects in this room

Avantar
01 Dec 2013, 22:09Fantastic! Thanx, Pertex.