GetBehaviorCount()
by Gellyware · in Torque Game Builder · 05/11/2007 (11:49 pm) · 1 replies
Does getBehaviorCount() work?
If so, how is it used?
The console keeps giving me errors from below saying either unknown command or unable to find function.
I've tried the following:
P.S. The behavior part works fine, just trying to get a "gemBehavior" count so I can loop through all of the behavior objects within it from another object.
If so, how is it used?
The console keeps giving me errors from below saying either unknown command or unable to find function.
I've tried the following:
function gemBehavior::checkForMoreGems(%this)
{
echo("getBehaviorCount():"@ getBehaviorCount());
echo("getBehaviorCount():"@ %this.getBehaviorCount());
echo("getBehaviorCount():"@ gemBehavior::getBehaviorCount());
}P.S. The behavior part works fine, just trying to get a "gemBehavior" count so I can loop through all of the behavior objects within it from another object.
About the author
Torque Owner Neo Binedell
try:
function gemBehavior::checkForMoreGems( %this ) { echo( "getBehaviorCount():" @ %this.owner.getBehaviorCount()); }Notice the %this.owner in there.