Game Development Community

Mounting Objects

by Harrison Brock · in Torque X 2D · 05/12/2007 (4:49 pm) · 2 replies

Hello,

I have been use torqueX for a last week or so. The first game that I work on was made with TGB so I try this first with TGB but didn't that good.

I have an object name tObj that has four other object mounted to it at N S E W. Is there anyway to get a list of the objects mounted on tobj? I would like to put all the sub-object into a list so that I can get more info on them.

So I need something like this. here is some Pseudocode:

GetMounted(name)
Get all Mounted Objects Names on name
mountedobjectList(add Mounted object names)
return mounedObjectList

Thanks for any help

Harrison Brock

#1
05/13/2007 (9:44 am)
T2DSceneObject has that kind of method:

T2DSceneObject.GetMountedObjects Method  

List of objects mounted to this object which match name. Wildcards can be used in name, so "*" will return all mounted objects.

public void GetMountedObjects(
   string name, 
   List<T2DSceneObject> list
)

Parameters 
name: Name of link point used to mount searched for objects. Wildcards are allowed in name.
list: List to add mounted objects to.
#2
05/13/2007 (10:32 am)
Thanks that help a lot. I was have a hard time tring this in TGB and torqueScript.