Difference between revisions of "LlGetParcelPrimCount"

From Second Life Wiki
Jump to navigation Jump to search
m
Line 4: Line 4:
|p1_type=vector|p1_name=pos|p1_desc=[[Viewer coordinate frames#Region|region coordinate]]
|p1_type=vector|p1_name=pos|p1_desc=[[Viewer coordinate frames#Region|region coordinate]]
|p2_type=integer|p2_name=category|p2_desc=a PARCEL_COUNT_* flag
|p2_type=integer|p2_name=category|p2_desc=a PARCEL_COUNT_* flag
|p3_type=integer|p3_name=sim_wide|p3_desc=boolean, if {{LSLG|FALSE}} returns the parcel count, otherwise sim wide
|p3_type=integer|p3_name=sim_wide|p3_desc=boolean, {{LSL Const|FALSE|integer|0|c=treated as false by conditionals}} for the parcel, otherwise for the [[sim]].
|func_footnote
|func_footnote
|func_desc
|func_desc
Line 10: Line 10:
|spec
|spec
|caveats
|caveats
|constants={{{!}}{{Prettytable}}
|constants={{{!}} class="sortable" {{Prettytable|style=margin-top:0;}}
{{!}}-{{Hl2}}
{{!}}-{{Hl2}}
!colspan="2"{{!}}Category!!Meaning
!Category
!alt="value"{{!}}
!Description
{{!}}-
{{!}}-
{{!}}{{LSLG|PARCEL_COUNT_TOTAL}}
{{!}}{{LSL Const|PARCEL_COUNT_TOTAL|integer|0|c=All prims on the parcel(s). Does not include temp on rez objects.}}
{{!}}0
{{!}}{{#var:value}}
{{!}}All prims on the parcel(s). Does not include temp on rez objects.
{{!}}{{#var:comment}}
{{!}}-
{{!}}-
{{!}}{{LSLG|PARCEL_COUNT_OWNER}}
{{!}}{{LSL Const|PARCEL_COUNT_OWNER|integer|1|c=Prims owned by the parcel owner.}}
{{!}}1
{{!}}{{#var:value}}
{{!}}Prims owned by the parcel owner.
{{!}}{{#var:comment}}
{{!}}-
{{!}}-
{{!}}{{LSLG|PARCEL_COUNT_GROUP}}
{{!}}{{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.}}
{{!}}2
{{!}}{{#var:value}}
{{!}}Prims not owned by the owner, but set to or owned by the group of the parcel.
{{!}}{{#var:comment}}
{{!}}-
{{!}}-
{{!}}{{LSLG|PARCEL_COUNT_OTHER}}
{{!}}{{LSL Const|PARCEL_COUNT_OTHER|integer|3|c=Prims not set to group or owned by the owner.}}
{{!}}3
{{!}}{{#var:value}}
{{!}}Prims not set to group or owned by the owner.
{{!}}{{#var:comment}}
{{!}}-
{{!}}-
{{!}}{{LSLG|PARCEL_COUNT_SELECTED}}
{{!}}{{LSL Const|PARCEL_COUNT_SELECTED|integer|4|c=All prims selected or sat on.}}
{{!}}4
{{!}}{{#var:value}}
{{!}}All prims selected or sat on.
{{!}}{{#var:comment}}
{{!}}-
{{!}}-
{{!}}{{LSLG|PARCEL_COUNT_TEMP}}
{{!}}{{LSL Const|PARCEL_COUNT_TEMP|integer|5|c=All temp on rez objects.}}
{{!}}5
{{!}}{{#var:value}}
{{!}}All temp on rez objects.
{{!}}{{#var:comment}}
{{!}}}
{{!}}}
|examples=
|examples=
<lsl>// Code initially created by Anthony Reisman (aka Anthony Bundy).
<lsl>//gives prim usage information when touched.
// It is free to use or distribute for any purpose
default
default
{
{

Revision as of 04:28, 30 May 2008

Summary

Function: integer llGetParcelPrimCount( vector pos, integer category, integer <span title="boolean, FALSE for the parcel, otherwise for the sim." style="border-bottom:1px dotted; cursor:help;">sim_wide );

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

• vector pos region coordinate
• integer category a PARCEL_COUNT_* flag
• integer sim_wide boolean, FALSE for the parcel, otherwise for the sim.

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

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 );