Difference between revisions of "LlGetObjectPrimCount"

From Second Life Wiki
Jump to navigation Jump to search
m
Line 10: Line 10:
'''object_id'''
'''object_id'''
*Avatars are not counted as prims, this is contrary to how [[llGetNumberOfPrims]] works.
*Avatars are not counted as prims, this is contrary to how [[llGetNumberOfPrims]] works.
*Does not work on avatars, always returns zero; this cannot be used to detect if an avatar is seated (use [[llGetAgentInfo]] instead).
*Does not work on avatars, always returns zero; this cannot be used to detect if an avatar is seated, use [[llGetAgentInfo]] instead.
|constants
|constants
|examples=
|examples=

Revision as of 08:42, 17 August 2008

Summary

Function: integer llGetObjectPrimCount( key prim );
0.0 Forced Delay
10.0 Energy

Returns an integer that is the total number of prims for an object in the sim that contains prim.

• key prim

Caveats

object_id

  • Avatars are not counted as prims, this is contrary to how llGetNumberOfPrims works.
  • Does not work on avatars, always returns zero; this cannot be used to detect if an avatar is seated, use llGetAgentInfo instead.

Examples

<lsl>default{

 touch_start( integer vIntTouched ){
   integer prims = llGetObjectPrimCount( llGetKey() );
   llSay( PUBLIC_CHANNEL, "This object has "
                          + (string)prims
                          + " prims and "
                          + (string)(llGetNumberOfPrims() - prims)
                          + " avatars.");
 }
}</lsl>

See Also

Functions

•  llGetNumberOfPrims Returns the number of prims in the current object.

Deep Notes

Signature

function integer llGetObjectPrimCount( key prim );