integer llGetNumberOfPrims();
Forced delay: 0.0 seconds. Energy: 10.0.
Returns an integer that is the number of prims in a link set the script is attached to.
default
{
state_entry()
{
llOwnerSay((string)llGetLinkNumber());
llOwnerSay((string)llGetNumberOfPrims());
}
}
// Returns the number of prims in the object, ignoring seated avatars
integer getNumberOfPrims(){
if (llGetObjectPrimCount(llGetKey()) == 0 ) return llGetNumberOfPrims(); // attachment
return llGetObjectPrimCount(llGetKey()); // non-attachment
}