Difference between revisions of "LlGetParcelPrimCount"

From Second Life Wiki
Jump to navigation Jump to search
Line 1: Line 1:
{{LSL_Constants/Parcel Prim Count}}{{#vardefine:FALSE|{{LSL Const|FALSE|integer|0|c=Treated as false by conditionals.}}}}
{{LSL_Function
{{LSL_Function
|inject-2=
{{LSL_Constants/Parcel Prim Count}}
{{LSL_Function/boolean|sim_wide|td=searches parcels in the region with the same owner as the targeted parcel|fd=searches only the targeted parcel|bool=*}}
|func_id=325|func_sleep=0.0|func_energy=10.0
|func_id=325|func_sleep=0.0|func_energy=10.0
|func=llGetParcelPrimCount|return_type=integer
|func=llGetParcelPrimCount|return_type=integer
|p1_type=vector|p1_name=pos|p1_desc=[[Viewer coordinate frames#Region|region coordinate]] (z component is ignored)
|p1_type=vector|p1_name=pos|p1_desc=[[Viewer coordinate frames#Region|region coordinate]] (z component is ignored)
|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
|p3_type=integer|p3_name=sim_wide|p3_desc
|func_footnote
|func_footnote
|func_desc
|func_desc
|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...
*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:TRUE}}{{Footnote|Any value that is not zero (FALSE) is treated the same as 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.
|caveats
|caveats

Revision as of 01:42, 26 November 2010

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, TRUE searches parcels in the region with the same owner as the targeted parcel, FALSE searches only the targeted parcel

Specification

If sim_wide is...

  • TRUE[1] 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

Footnotes

  1. ^ Any value that is not zero (FALSE) is treated the same as TRUE.

Signature

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