Author Topic: SOHierarchy - CANCELLED because you can just use getgroup  (Read 2216 times)

SOHierarchy was going to use ScriptObjects but ScriptGroups allow me to put objects into something easier.

Classes added:

SOHierarchy
The SOHierarchy standard class. It can have SOHierarchyNodes and other SimObjects

SOHierarchyNode
A stricter form of SOHierarchy. It must have a hierarchyParent to add itself into. Its superClass should be SOHierachy, but it'll auto-correct it for you.

Other objects can have hierarchial parents.
Other groups can have hierarchial parents, but their members won't have the group as their hierarchial parent.

Added methods:
richard


just use getGroup();
« Last Edit: August 06, 2012, 10:10:50 PM by Axolotl »

I'm going to test the getDepth method.

EDIT: Sometimes the namespace parenting bugs out and gives me an error saying "cannot change namespace parent linkage for SOHierarchyNode from ScriptObject to SOHierarchy". It might be a coding bug on my side or ScriptGroups are only allowed to have classes.
« Last Edit: August 06, 2012, 05:19:24 PM by Axolotl »


What is this
something that will make saving stuff easier

something that will make saving stuff easier

How does it make saving things easier..

What is this
Basically a hierarchy system for torque:


If we dump the red SimObject, then its hierarchyParent value will be set to the pink SOHierarchy's ObjectID.
If we dump the blue SimObject, then its hierarchyParent value will be set to the blue SOHierarchyNode's ObjectID.
If we dump the blue SOHierarchyNode, then its hierarchyParent value will be set to the pink SOHierarchy's ObjectID.
If we dump the pink SOHierarchy, then it won't have a hierarchyParent value.


How does it make saving things easier..
I didn't think about that, oops.
« Last Edit: August 06, 2012, 06:36:53 PM by Axolotl »

Basically a hierarchy system for torque:

I didn't think about that, oops.

I'm just not quite understanding, can you provide an example? is that the example?
« Last Edit: August 06, 2012, 06:37:48 PM by elm »

I'm just not quite understanding, can you provide an example?
If we dump the red SimObject, then its hierarchyParent value will be set to the pink SOHierarchy's ObjectID.
If we dump the blue SimObject, then its hierarchyParent value will be set to the blue SOHierarchyNode's ObjectID.
If we dump the blue SOHierarchyNode, then its hierarchyParent value will be set to the pink SOHierarchy's ObjectID.
If we dump the pink SOHierarchy, then it won't have a hierarchyParent value.

If we dump the red SimObject, then its hierarchyParent value will be set to the pink SOHierarchy's ObjectID.
If we dump the blue SimObject, then its hierarchyParent value will be set to the blue SOHierarchyNode's ObjectID.
If we dump the blue SOHierarchyNode, then its hierarchyParent value will be set to the pink SOHierarchy's ObjectID.
If we dump the pink SOHierarchy, then it won't have a hierarchyParent value.

Ok can you give me an example of how this could be used, code-wise?

lol this mod is redundant because of getGroup and other stuff. Cancelling this project...