SimSet Problem
by Paul Drust · in Torque Game Builder · 11/18/2008 (7:35 am) · 2 replies
I am trying to use a SimSet to track all the objects I create using CloneWithBehavior.
I create the SimSet in StartGame like this...
function startGame(%level)
{
...
$GameLevel = %level;
...
$GameLevel.BubbleList = new SimSet();
...
}
When I try and manipulate the SimSet using the "Add" method, "ListObject", etc. from other methods I get funky errors that it is trying to execute the method on a WAV file!
EX: %tempCount = $GameLevel.BubbleList.GetCount();
Maybe referencing the level as a global variable like I'm doing is the problem, but I have no idea.
Help Mr. Wizard!
I create the SimSet in StartGame like this...
function startGame(%level)
{
...
$GameLevel = %level;
...
$GameLevel.BubbleList = new SimSet();
...
}
When I try and manipulate the SimSet using the "Add" method, "ListObject", etc. from other methods I get funky errors that it is trying to execute the method on a WAV file!
EX: %tempCount = $GameLevel.BubbleList.GetCount();
Maybe referencing the level as a global variable like I'm doing is the problem, but I have no idea.
Help Mr. Wizard!
#2
Thanks for the reply. And no, I never close the level.
I will try assigning $GameLevel as you suggest.
Thanks alot!
11/18/2008 (4:05 pm)
Nikos,Thanks for the reply. And no, I never close the level.
I will try assigning $GameLevel as you suggest.
Thanks alot!
Torque Owner Nikos Beck
So, just have:
$GameLevel = new ScriptObject();
$GameLevel.BubbleList = new SimSet();
And see what happens.