How to get the SimGroup`s parameters which created in script?
by FanZhang · in Torque Game Engine Advanced · 07/27/2009 (2:53 am) · 2 replies
Now I have created a simGroup in script like this
new SimGroup(ExaminationOne){
canSaveDynamicFields = "1";
RightOption = 3;
new ScriptGroup(OptionOne){
optionTitle = "option one";
};
new ScriptGroup(OptionTwo){
optionTitle = "option Two";
};
new ScriptGroup(OptionThree){
optionTitle = "option Three";
};
new ScriptGroup(OptionFour){
optionTitle = "option Four";
};
};
which edited in a *.cs file.
the problem is that i could not use the SimGroup.getObejct(Num) in script,How could i get the parameters in scriptGroup like OptionOne.optionTile?Thnx:)
new SimGroup(ExaminationOne){
canSaveDynamicFields = "1";
RightOption = 3;
new ScriptGroup(OptionOne){
optionTitle = "option one";
};
new ScriptGroup(OptionTwo){
optionTitle = "option Two";
};
new ScriptGroup(OptionThree){
optionTitle = "option Three";
};
new ScriptGroup(OptionFour){
optionTitle = "option Four";
};
};
which edited in a *.cs file.
the problem is that i could not use the SimGroup.getObejct(Num) in script,How could i get the parameters in scriptGroup like OptionOne.optionTile?Thnx:)
About the author
Recent Threads
#2
Ok,it could work well now
07/27/2009 (7:32 pm)
A!I have made a foolish mistake:Do not exec the *.cs into the memory:{Ok,it could work well now
Torque Owner Ryan Mounts
CornerstoneViz
function printOptions()
{
for(%i = 0; %i < ExaminationOne.getCount(); %i++)
{
%option = ExaminationOne.getObject(%i);
echo(%option.optionTitle);
}
}