How to access the MissionGroup objects?
by Liu Yi · in Torque Game Engine · 12/12/2006 (2:08 am) · 1 replies
I know that in the scripts, the MissionGroup objects can be accessed using a statement like this:
%obj="MissionGroup/Tank".getObject(%i);
Is there any similar way in the engine to access the objects in the MissionGroup?
Thanks
%obj="MissionGroup/Tank".getObject(%i);
Is there any similar way in the engine to access the objects in the MissionGroup?
Thanks
Torque Owner Joshua Jewell
SimSet * missionGroup = static_cast<SimSet*>(Sim::findObject("MissionGroup")); if(missionGroup) { mConsoleRendering = true; glEnable(GL_DEPTH_TEST); glDepthFunc(GL_LEQUAL); for(SimSetIterator itr(missionGroup); *itr; ++itr) { char buf[2][16]; dSprintf(buf[0], 16, (*itr)->isSelected() ? "true" : "false"); dSprintf(buf[1], 16, (*itr)->isExpanded() ? "true" : "false"); Con::executef(*itr, 4, "onEditorRender", getIdString(), buf[0], buf[1]); } glDisable(GL_DEPTH_TEST); mConsoleRendering = false; }Sim::findObject("MissionGroup") seems to be the way to access the MissionGroup.