Difference between revisions of "LlGetParcelPrimCount"

From Second Life Wiki
Jump to navigation Jump to search
m (directory transact the template)
(Fixed some engrish)
Line 10: Line 10:
|return_text=that is the number of prims on the parcel at '''pos''' of the given '''category'''
|return_text=that is the number of prims on the parcel at '''pos''' of the given '''category'''
|spec=If '''sim_wide''' is...
|spec=If '''sim_wide''' is...
*{{#var:TRUE}} then the return is the combined number of prims on all parcels in the sim owned by the specified parcel's owner of the category requested.
*{{#var:FALSE}} then the return is the number of prims of the category requested on the parcel specified.
*{{#var:FALSE}} then the return is the number of prims of the category requested on the parcel specified.
*''not'' {{#var:FALSE}} then the return is the combined number of prims on all parcels in the sim owned by the specified parcel's owner of the category requested.
|caveats
|caveats
|constants
|constants

Revision as of 00:41, 26 November 2010

Category Description
PARCEL_COUNT_TOTAL 0 All objects on the parcel(s). Does not include temp on rez objects.
PARCEL_COUNT_OWNER 1 Objects owned by the parcel owner.
PARCEL_COUNT_GROUP 2 Objects not owned by the owner, but set to or owned by the group of the parcel.
PARCEL_COUNT_OTHER 3 Objects not set to group or owned by the owner.
PARCEL_COUNT_SELECTED 4 All objects selected or sat on.
PARCEL_COUNT_TEMP 5 All temp on rez objects.

Summary

Function: integer llGetParcelPrimCount( vector pos, integer category, integer sim_wide );

Returns an integer that is the number of prims on the parcel at pos of the given category

• vector pos region coordinate (z component is ignored)
• integer category a PARCEL_COUNT_* flag
• integer sim_wide boolean

Specification

If sim_wide is...

  • then the return is the combined number of prims on all parcels in the sim owned by the specified parcel's owner of the category requested.
  • FALSE then the return is the number of prims of the category requested on the parcel specified.

Examples

<lsl>//gives prim usage information when touched. default {

   touch_start(integer total_number)
   {
       vector pos = llGetPos();
       llSay(0, "There are " + (string)llGetParcelPrimCount(pos, PARCEL_COUNT_TOTAL, FALSE) +
                " total prims on this parcel");
       llSay(0, (string)llGetParcelPrimCount(pos, PARCEL_COUNT_OWNER, FALSE) +
                " prims are owned by the parcel owner");
       llSay(0, (string)llGetParcelPrimCount(pos, PARCEL_COUNT_GROUP, FALSE) +
                " prims set to or owned by the parcel's group.");
       llSay(0, (string)llGetParcelPrimCount(pos, PARCEL_COUNT_OTHER, FALSE) +
                " prims that are not set to the parcel group or owned by the parcel owner");
       llSay(0, (string)llGetParcelPrimCount(pos, PARCEL_COUNT_SELECTED, FALSE) +
                " prims are selected");
       llSay(0, (string)llGetParcelPrimCount(pos, PARCEL_COUNT_TEMP, FALSE) +
                " prims are temp-on-rez");
   }
}</lsl>

See Also

Functions

•  llGetParcelMaxPrims

Deep Notes

Search JIRA for related Issues

Signature

function integer llGetParcelPrimCount( vector pos, integer category, integer sim_wide );