SimGroup question
by J. Donavan Stanley · in Torque Game Engine · 04/21/2003 (7:01 pm) · 0 replies
I've been mucking around with some XML based persistance code for serializing SimObject based classes to and from storage. I've hit an oddball snag when dealing with SimGroups..
When I iterate over a SimGroup (specificly the MissionGroup), I get the contents on contained SimSets as part of the main SimGroup.
As an example let's assume the MissionGroup contains the following
SimObject foo
SimObject foo2
SimSet bar
SimObject foo5
Within SimSet bar you have
SimObject foo3
SimObject foo4
Now if I iterate over the contents of MissionGroup I get
SimObject foo
SimObject foo2
SimSet bar
SimObject foo3
SimObject foo4
SimObject foo5
Somehow foo3 and foo4 show up in the MissionGroup in addition to showing up in the SimSetBar. This would lead to my having two copies...
So do nested containers act oddly or is there something else I'm missing?
When I iterate over a SimGroup (specificly the MissionGroup), I get the contents on contained SimSets as part of the main SimGroup.
As an example let's assume the MissionGroup contains the following
SimObject foo
SimObject foo2
SimSet bar
SimObject foo5
Within SimSet bar you have
SimObject foo3
SimObject foo4
Now if I iterate over the contents of MissionGroup I get
SimObject foo
SimObject foo2
SimSet bar
SimObject foo3
SimObject foo4
SimObject foo5
Somehow foo3 and foo4 show up in the MissionGroup in addition to showing up in the SimSetBar. This would lead to my having two copies...
So do nested containers act oddly or is there something else I'm missing?