Need help finding objects by ID or Name in the C++
by Vince Gee · in Torque 3D Professional · 02/25/2012 (10:03 pm) · 2 replies
Anyone know how to get a hold of these object from the outside, most of the declares can either be gotten by Sim::FindObject or the abstract class thing. BUT these objects I can not figure out how to find by name or id regardless of what I try.
GuiClockHud
GuiChunkedBitmapCtrl
GuiDragAndDropControl
GuiWindowCtrl
GuiEditCtrl
InteriorInstance
ShaderData
PostEffect
SFXSound
SFXState
RigidShape
DecalData
SFXEmitter
CubemapData
Path (Ambiguity error message on this)
SimpleNetObject (I think this is a testing object)
So basically I have 875 externs converted out of a possible 922. I would really like to get all 922. If anyone knows of a way to find the above objects when you only have their name or id, I would really appreciate the info.
GuiClockHud
GuiChunkedBitmapCtrl
GuiDragAndDropControl
GuiWindowCtrl
GuiEditCtrl
InteriorInstance
ShaderData
PostEffect
SFXSound
SFXState
RigidShape
DecalData
SFXEmitter
CubemapData
Path (Ambiguity error message on this)
SimpleNetObject (I think this is a testing object)
So basically I have 875 externs converted out of a possible 922. I would really like to get all 922. If anyone knows of a way to find the above objects when you only have their name or id, I would really appreciate the info.
About the author
www.winterleafentertainment.com
#2
02/26/2012 (3:05 am)
Quote:Path (Ambiguity error message on this)I think you may need to use Sim::Path - Path is also a class used in the console internals to refer to a file path. I *think*.
Torque Owner Jean-louis Amadi
Game Alchemy Entertainment
On the C++ side, there is various special SimGroup's as:
And a very special "RootGroup" which theorically contains all the objects created from the start of the app.
You can get these special groups in C++ with :
Sim::get#NameOfTheSpecialGroup#()->, in the case of RootGroup it become Sim::getRootGroup()->
After you can iterate in and find their objects or use :
Sim::getRootGroup()->findObject(const char* name)
But It seem that the classical 'Sim::findObject(...)' use already RootGroop...
PostFX are stored in "PFXSet" which is stored in "RootGroup", these specificities have to be found in the code...
I hope this helps. ;)