Game Development Community

Mounted Children Question

by Chris Aiken · in Torque Game Builder · 10/04/2006 (8:16 am) · 1 replies

Is it possible to determine what objects are mounted TO a particular object? In other words, suppose object A is mounted to object B. I can use A.GetMountedParent() to get B, but is there anyway to reference A from B?

About the author


#1
10/07/2006 (1:41 am)
Chris, I checked the docs and I think the answer to your question is: no. But you could track it with a SimSet in the parent object. Something like

if(! isObject( %tParent.mountedChildren)
%tParent.mountedChildren = new SimSet();
%tChild.mount( %tParent , ... );
%tParent.mountedChildren.add ( % tChild );