OsGetPrimCount: Difference between revisions

From OpenSimulator
Jump to navigationJump to search
imported>Ubit
Created page with "{{osslfunc |threat_level=none ||permissions=${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER |delay=0 |function_syntax=integer osTeleportObject(key objectID) |ossl_example=..."
 
imported>Ubit
No edit summary
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{osslfunc
{{osslfunc
|threat_level=none
|threat_level=ignored
||permissions=${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER
|permissions=true
|delay=0
|delay=0|function_syntax=integer osGetPrimCount()<br>
|function_syntax=integer osTeleportObject(key objectID)
integer osGetPrimCount(key objectID)<br>
|ossl_example=<source lang="lsl">
|ossl_example=<source lang="lsl">


Line 14: Line 14:
     touch_start(integer num)
     touch_start(integer num)
     {
     {
         // target position in region local coords
         llOwnerSay(" this linkset has " + (string) osGetPrimCount() + " prims");
        vector target =<873.911926, 879.844910, 21.332354>; 
        rotation rot =<0,0,0.707,.707>;
        osTeleportObject(llGetKey(),target,rot,1);
     }
     }
}
}
</source>
</source>
|description=...
|description=
returns the number of prims of the current linkset or of the linkset that includes a prim with UUID objectID.


===== Arguments: =====
Unlike ll* versions, does not count sitting avatars and does work on attachments.
* objectID optional key a prim




|additional_info=This function was added in 0.9.3.0
|additional_info=This function was added in 0.9.3.0
}}
}}

Latest revision as of 23:25, 14 June 2023

integer osGetPrimCount()

integer osGetPrimCount(key objectID)

returns the number of prims of the current linkset or of the linkset that includes a prim with UUID objectID.

Unlike ll* versions, does not count sitting avatars and does work on attachments.

Threat Level This function does not do a threat level check
Permissions Use of this function is always allowed by default
Extra Delay 0 seconds
Example(s)
default
{
    state_entry()
    {
       llSay(0, "Script running");
    }
    touch_start(integer num)
    {
        llOwnerSay(" this linkset has " + (string) osGetPrimCount() + " prims");
    }
}
Notes
This function was added in 0.9.3.0