Difference between revisions of "LlGetParcelPrimCount"

From Second Life Wiki
Jump to navigation Jump to search
Line 38: Line 38:
{{!}}All temp on rez objects.
{{!}}All temp on rez objects.
{{!}}}
{{!}}}
|examples
|examples=
<lsl>
// Code initially created by Anthony Reisman (aka Anthony Bundy).
// It is free to use or distribute for any purpose
default
{
    state_entry()
    {
    }
 
    touch_start(integer total_number)
    {
        llSay(0, "There are " + (string)llGetParcelPrimCount(llGetPos(), PARCEL_COUNT_TOTAL, FALSE) +" total prims on this parcel");
        llSay(0, (string)llGetParcelPrimCount(llGetPos(), PARCEL_COUNT_OWNER, FALSE) +" prims are owned by the parcel owner");
        llSay(0, (string)llGetParcelPrimCount(llGetPos(), PARCEL_COUNT_GROUP, FALSE) +" prims set to or owned by the parcel's group.");
        llSay(0, (string)llGetParcelPrimCount(llGetPos(), PARCEL_COUNT_OTHER, FALSE) +" prims that are not set to the parcel group or owned by the parcel owner");
        llSay(0, (string)llGetParcelPrimCount(llGetPos(), PARCEL_COUNT_SELECTED, FALSE) +" prims are selected");
        llSay(0, (string)llGetParcelPrimCount(llGetPos(), PARCEL_COUNT_TEMP, FALSE) +" prims are temp-on-rez");
    }
 
}
</lsl>
|helpers
|helpers
|also_functions
|also_functions=
{{LSL DefineRow||[[llGetParcelMaxPrims]]}}
|also_events
|also_events
|also_tests
|also_tests

Revision as of 07:54, 17 February 2008

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
• integer category a PARCEL_COUNT_* flag
• integer sim_wide boolean, if FALSE returns the parcel count, otherwise sim wide

Category Meaning
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> // Code initially created by Anthony Reisman (aka Anthony Bundy). // It is free to use or distribute for any purpose default {

   state_entry()
   {
   }
   touch_start(integer total_number)
   {
       llSay(0, "There are " + (string)llGetParcelPrimCount(llGetPos(), PARCEL_COUNT_TOTAL, FALSE) +" total prims on this parcel");
       llSay(0, (string)llGetParcelPrimCount(llGetPos(), PARCEL_COUNT_OWNER, FALSE) +" prims are owned by the parcel owner");
       llSay(0, (string)llGetParcelPrimCount(llGetPos(), PARCEL_COUNT_GROUP, FALSE) +" prims set to or owned by the parcel's group.");
       llSay(0, (string)llGetParcelPrimCount(llGetPos(), PARCEL_COUNT_OTHER, FALSE) +" prims that are not set to the parcel group or owned by the parcel owner");
       llSay(0, (string)llGetParcelPrimCount(llGetPos(), PARCEL_COUNT_SELECTED, FALSE) +" prims are selected");
       llSay(0, (string)llGetParcelPrimCount(llGetPos(), 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 );