Game Development Community

Get all behaviors

by Larry Jennings II · in Torque Game Builder · 05/19/2012 (7:05 pm) · 3 replies

Can anybody inform me ,or provide a link on how to get all the behaviors attached to a scene object?

#1
05/20/2012 (4:04 pm)
%behaviorCount = %object.getBehaviorCount();

for(%i = 0; %i < %behaviorCount; %i++)
{
   %behavior = %object. getBehaviorByIndex(%i);
}

#2
05/20/2012 (7:20 pm)
Thanks
#3
05/20/2012 (7:46 pm)
You're welcome.