Difference between revisions of "LlGetParcelMaxPrims"

From Second Life Wiki
Jump to navigation Jump to search
Line 1: Line 1:
{{#vardefine:FALSE|{{LSL Const|FALSE|integer|0|c=Treated as false by conditionals.}}}}
{{LSL_Function
{{LSL_Function
|func_id=326|func_sleep=0.0|func_energy=10.0
|func_id=326|func_sleep=0.0|func_energy=10.0
Line 4: Line 5:
|return_type=integer
|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=sim_wide|p2_desc=boolean, {{LSL Const|FALSE|integer|0|c=treated as false by conditionals}} for the parcel, otherwise for the [[sim]].
|p2_type=integer|p2_name=sim_wide|p2_desc=Boolean
|func_footnote
|func_footnote=If '''sim_wide''' is...
*{{#var:FALSE}} then the return is the maximum prims supported by the parcel.
*''not'' {{#var:FALSE}} then the return is the combined number of prims supported by all parcels in the sim owned by the specified parcel's owner.
|func_desc
|func_desc
|return_text=that is the maximum number of prims allowed on the parcel at '''pos'''.
|return_text=that is the maximum number of prims allowed on the parcel at '''pos'''.

Revision as of 02:56, 31 May 2008

Summary

Function: integer llGetParcelMaxPrims( vector pos, integer sim_wide );

Returns an integer that is the maximum number of prims allowed on the parcel at pos.

• vector pos region coordinate (z component is ignored)
• integer sim_wide Boolean

If sim_wide is...

  • FALSE then the return is the maximum prims supported by the parcel.
  • not FALSE then the return is the combined number of prims supported by all parcels in the sim owned by the specified parcel's owner.

Examples

<lsl>default {

   touch_start(integer total_number)
   {
       llSay(0, "There are " + (string)llGetParcelPrimCount(llGetPos(), PARCEL_COUNT_TOTAL, FALSE) +" of "
            +(string)llGetParcelMaxPrims(llGetPos(), FALSE) + " prims rezzed on this parcel");
   }
}</lsl>

Useful Snippets

<lsl>integer IsThisAVoidSim()//Test if a sim is a void sim {//void sims support only 3750 prims, but we give it some room to grow.

   return llGetParcelMaxPrims( ZERO_VECTOR, TRUE ) <= 7500;

}</lsl>

See Also

Functions

•  llGetParcelPrimCount

Deep Notes

Search JIRA for related Issues

Signature

function integer llGetParcelMaxPrims( vector pos, integer sim_wide );