OsGetPrimitiveParams

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
m (Robot: Cosmetic changes)
m (Change See Also)
 
(12 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 
{{osslfunc
 
{{osslfunc
|threat_level=High
+
|threat_level=None
|function_syntax=list osGetPrimitiveParams(key prim, list rules)
+
|permissions=${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER
|ossl_example=See the example of [[OsSetPrimitiveParams]].
+
|delay=0
|description=* Gets the parameters for the prim specified by '''prim_uuid''' according to '''rules'''.
+
|function_syntax=list osGetPrimitiveParams(key primId, list rules)
 +
|description=* Gets the parameters for the prim specified by '''primId''' according to '''rules'''.
 
* This function has the same behave as llGetPrimitiveParams except you can specify target prim anywhere in the scene.
 
* This function has the same behave as llGetPrimitiveParams except you can specify target prim anywhere in the scene.
 
* For general information about '''rules''', see [http://wiki.secondlife.com/wiki/LlGetPrimitiveParams llGetPrimitiveParams in SecondLife Wiki].
 
* For general information about '''rules''', see [http://wiki.secondlife.com/wiki/LlGetPrimitiveParams llGetPrimitiveParams in SecondLife Wiki].
* Check [[LSL Status/Functions|llGetPrimitiveParams implementation status]] to see the differences from llGetPrimitiveParams.
+
* If there is prim with id '''primId''' in the scene, or the owner of the target prim is different from the owner of the scripted prim, it will fail without error.
* If there is no '''prim_uuid''' prim in the scene, or the owner of the target prim is differ from the owner of the scripted prim, it will fail without error.
+
|ossl_example=<source lang="lsl">
* NOTE: As of OpenSimulator 0.7.1.1, this function doesn't work, results in script error([http://opensimulator.org/mantis/view.php?id=5560 #5560]). It will able to do so on 0.7.2-dev or later.
+
//
|
+
// osGetPrimitiveParams Script Exemple
 +
//
 +
 
 +
// Change target_uuid to any uuid of the prim you wish to get params.
 +
string target_uuid = "44d375e6-c42b-49ad-b01d-663309350511";
 +
 
 +
default
 +
{
 +
    state_entry()
 +
    {
 +
        llSay(PUBLIC_CHANNEL, "Touch to see osGetPrimitiveParams usage.");
 +
    }
 +
 
 +
    touch_start(integer number)
 +
    {
 +
        list buffer = osGetPrimitiveParams(target_uuid, [PRIM_NAME, PRIM_SIZE, PRIM_POSITION, PRIM_ROTATION]);
 +
 
 +
        llSay(PUBLIC_CHANNEL, "[PRIM_NAME] " + llList2String(buffer, 0));
 +
        llSay(PUBLIC_CHANNEL, "[PRIM_SIZE] " + llList2String(buffer, 1));
 +
        llSay(PUBLIC_CHANNEL, "[PRIM_POSITION] " + llList2String(buffer, 2));
 +
        llSay(PUBLIC_CHANNEL, "[PRIM_ROTATION] " + llList2String(buffer, 3));
 +
    }
 +
}
 +
</source>
 +
|additional_info=This function was added in 0.7
 
}}
 
}}
 +
== See Also ==
 +
* [[osSetPrimitiveParams]]
 +
* [[osGetPrimitiveParams]]

Latest revision as of 18:59, 5 December 2020

list osGetPrimitiveParams(key primId, list rules)
  • Gets the parameters for the prim specified by primId according to rules.
  • This function has the same behave as llGetPrimitiveParams except you can specify target prim anywhere in the scene.
  • For general information about rules, see llGetPrimitiveParams in SecondLife Wiki.
  • If there is prim with id primId in the scene, or the owner of the target prim is different from the owner of the scripted prim, it will fail without error.
Threat Level None
Permissions ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER
Extra Delay 0 seconds
Example(s)
//
// osGetPrimitiveParams Script Exemple
//
 
// Change target_uuid to any uuid of the prim you wish to get params.
string target_uuid = "44d375e6-c42b-49ad-b01d-663309350511";
 
default
{
    state_entry()
    {
        llSay(PUBLIC_CHANNEL, "Touch to see osGetPrimitiveParams usage.");
    }
 
    touch_start(integer number) 
    {
        list buffer = osGetPrimitiveParams(target_uuid, [PRIM_NAME, PRIM_SIZE, PRIM_POSITION, PRIM_ROTATION]);
 
        llSay(PUBLIC_CHANNEL, "[PRIM_NAME] " + llList2String(buffer, 0));
        llSay(PUBLIC_CHANNEL, "[PRIM_SIZE] " + llList2String(buffer, 1));
        llSay(PUBLIC_CHANNEL, "[PRIM_POSITION] " + llList2String(buffer, 2));
        llSay(PUBLIC_CHANNEL, "[PRIM_ROTATION] " + llList2String(buffer, 3));
    }
}
Notes
This function was added in 0.7


[edit] See Also

Personal tools
General
About This Wiki