OsGetLinkPrimitiveParams: Difference between revisions

From OpenSimulator
Jump to navigationJump to search
imported>MakoBot
m Removed 'Template:' prefix from template includings and/or changed external-link into internal-link
imported>Fritigern
No edit summary
Line 1: Line 1:
{{Quicklinks}}
{{Quicklinks}}
{|  width="100%" style="border: thin solid black"
| colspan="2" align="center" style=background:orange | '''{{SUBPAGENAME}}'''
|- valign="top"
|'''Threat Level''' || High


LSL: '''[[list]] osGetLinkPrimitiveParams( [[integer]] linknumber, [[list]] params )'''<br />
|- valign="top"
C#: '''[[LSL_List]] osGetRegionStats( [[int]] linknumber, [[LSL_List]] params )'''
|'''Function Syntax''' || <source lang="lsl">
 
LSL: list osGetLinkPrimitiveParams( integer linknumber, list params )
Returns the primitive parameters for the linkset prim or prims specified by '''linknumber'''. It is possible to use the linkset constants (e.g. '''LINK_SET''', '''LINK_ALL_CHILDREN''') in place of a specific link number, in which case the requested parameters of each relevant prim are concatenated to the end of the list. Otherwise, the usage is identical to llGetPrimitiveParams().
C#: LSL_List osGetRegionStats( int linknumber, LSL_List params )
 
</source>
This function has a [[threat level]] of High, to prevent unscrupulous users from easily retrieving the construction details of an entire linkset. Please see the [[threat level]] page for information on how to enable the use of this function securely.
|- valign="top"
 
|'''Example(s)||<source lang="lsl">
Example script:
 
<source lang="lsl">
// llGetLinkPrimitiveParams() example script
// llGetLinkPrimitiveParams() example script
//
//
Line 31: Line 32:
     }
     }
}</source>
}</source>
|}
Returns the primitive parameters for the linkset prim or prims specified by '''linknumber'''. It is possible to use the linkset constants (e.g. '''LINK_SET''', '''LINK_ALL_CHILDREN''') in place of a specific link number, in which case the requested parameters of each relevant prim are concatenated to the end of the list. Otherwise, the usage is identical to llGetPrimitiveParams().




[[Category:OSSL]]
[[Category:OSSL Functions]]

Revision as of 16:32, 11 June 2011

OsGetLinkPrimitiveParams
Threat Level High
Function Syntax
LSL: list osGetLinkPrimitiveParams( integer linknumber, list params )
C#: LSL_List osGetRegionStats( int linknumber, LSL_List params )
Example(s)
// llGetLinkPrimitiveParams() example script
//
// Trivial example which averages the sizes of all the prims in the linkset and returns the resuilt.
//
default
{
    state_entry()
    {
        vector average = ZERO_VECTOR;
        list params = osGetLinkPrimitiveParams( LINK_SET, [ PRIM_SIZE ] );
        integer len = llGetListLength( params );
        integer i;
        
        for (i = 0; i < len; i++)
            average += llList2Vector( params, i );
        
        average /= (float) len;
        llOwnerSay( "The average size of the prims in this linkset is " + (string) average );
    }
}

Returns the primitive parameters for the linkset prim or prims specified by linknumber. It is possible to use the linkset constants (e.g. LINK_SET, LINK_ALL_CHILDREN) in place of a specific link number, in which case the requested parameters of each relevant prim are concatenated to the end of the list. Otherwise, the usage is identical to llGetPrimitiveParams().