Difference between revisions of "LlGetParcelPrimCount"

From Second Life Wiki
Jump to navigation Jump to search
m
m (you will see)
Line 1: Line 1:
{{#vardefine:FALSE|{{LSL Const|FALSE|integer|0|c=Treated as false by conditionals.}}}}
{{LSL_Constans/Parcel Prim Count}}{{#vardefine:FALSE|{{LSL Const|FALSE|integer|0|c=Treated as false by conditionals.}}}}
{{LSL_Function
{{LSL_Function
|func_id=325|func_sleep=0.0|func_energy=10.0
|func_id=325|func_sleep=0.0|func_energy=10.0
Line 13: Line 13:
*''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.
*''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={{{!}} class="sortable" {{Prettytable|style=margin-top:0;}}
|constants
{{!}}-{{Hl2}}
!Category
!alt="value"{{!}}
!Description
{{!}}-
{{!}}{{LSL Const|PARCEL_COUNT_TOTAL|integer|0|c=All prims on the parcel(s). Does not include temp on rez objects.}}
{{!}}{{#var:value}}
{{!}}{{#var:comment}}
{{!}}-
{{!}}{{LSL Const|PARCEL_COUNT_OWNER|integer|1|c=Prims owned by the parcel owner.}}
{{!}}{{#var:value}}
{{!}}{{#var:comment}}
{{!}}-
{{!}}{{LSL Const|PARCEL_COUNT_GROUP|integer|2|c=Prims not owned by the owner, but set to or owned by the group of the parcel.}}
{{!}}{{#var:value}}
{{!}}{{#var:comment}}
{{!}}-
{{!}}{{LSL Const|PARCEL_COUNT_OTHER|integer|3|c=Prims not set to group or owned by the owner.}}
{{!}}{{#var:value}}
{{!}}{{#var:comment}}
{{!}}-
{{!}}{{LSL Const|PARCEL_COUNT_SELECTED|integer|4|c=All prims selected or sat on.}}
{{!}}{{#var:value}}
{{!}}{{#var:comment}}
{{!}}-
{{!}}{{LSL Const|PARCEL_COUNT_TEMP|integer|5|c=All temp on rez objects.}}
{{!}}{{#var:value}}
{{!}}{{#var:comment}}
{{!}}}
|examples=
|examples=
<lsl>//gives prim usage information when touched.
<lsl>//gives prim usage information when touched.

Revision as of 08:22, 16 April 2009

Deletion Requested
The deletion of this article was requested for the following reason:

mispelling

If there is a need to discuss the deletion of this article, please add your comment(s) here.

Summary

Function: integer llGetParcelPrimCount( vector pos, integer category, integer sim_wide );
0.0 Forced Delay
10.0 Energy

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...

  • FALSE then the return is the number of prims of the category requested on the parcel specified.
  • not 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.

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

Signature

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