integer llGetNumberOfPrims()
Returns the number of
prims in (and
avatars seated on) the
object the
script is in.
Note: this
function works regardless of whether the script is in the
parent or a
child prim in a
linked set.
More streamlined versions of these above functions from
LSL Portal:
//Returns the number of agents on the object
integer GetNumberOfAgents()
{
return llGetNumberOfPrims() - llGetObjectPrimCount(llGetKey()); //counts avatars
}
//Returns the number of prims in the object
integer GetNumberOfPrims()
{
return llGetObjectPrimCount(llGetKey()); //ignores avatars
}
This article wasn't helpful for you? Maybe the
related article at the LSL Portal is able to bring enlightenment.
Functions |
Object |
Prim |
Link