From Second Life Wiki
Template:Needs Translation/LSL/de
Template:Needs Translation/LSL/es
Template:Needs Translation/LSL/el
Template:Needs Translation/LSL/he
Template:Needs Translation/LSL/it
Template:Needs Translation/LSL/ko
Template:Needs Translation/LSL/nl
Template:Needs Translation/LSL/hu
Template:Needs Translation/LSL/no
Template:Needs Translation/LSL/da
Template:Needs Translation/LSL/sv
Template:Needs Translation/LSL/tr
Template:Needs Translation/LSL/pl
Template:Needs Translation/LSL/pt
Template:Needs Translation/LSL/ru
Template:Needs Translation/LSL/uk
Template:Needs Translation/LSL/zh-Hans
Template:Needs Translation/LSL/zh-Hant
/LSL
GetParcelPrimCount
llGetParcelPrimCount
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...
- 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
//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");
}
}