OsSetPrimitiveParams

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
m (some format conversions)
Line 1: Line 1:
{{osslfunc|
+
{{osslfunc
threat_level = High
+
|threat_level=High
|
+
|function_syntax=osSetPrimitiveParams(key prim_uuid, list rules);  
function_syntax = <source lang="lsl">
+
|ossl_example=<source lang="lsl">
osSetPrimitiveParams(key prim_uuid, list rules);  
+
</source>
+
|
+
ossl_example = <source lang="lsl">
+
 
// change target_uuid to any uuid of the prim you wish to change visibility by clicking.
 
// change target_uuid to any uuid of the prim you wish to change visibility by clicking.
 
string target_uuid = "69031c69-36a5-4031-bdc8-8ca8c37f8eda";
 
string target_uuid = "69031c69-36a5-4031-bdc8-8ca8c37f8eda";
Line 37: Line 33:
 
}
 
}
 
</source>
 
</source>
|  
+
|description=* Sets the parameters for the prim specified by '''prim_uuid''' according to '''rules'''.
additional_info = * Sets the parameters for the prim specified by '''prim_uuid''' according to '''rules'''.
+
 
* This function has the same behave as llSetPrimitiveParams except you can specify target prim anywhere in the scene.
 
* This function has the same behave as llSetPrimitiveParams except you can specify target prim anywhere in the scene.
 
* For general information about '''rules''', see [http://wiki.secondlife.com/wiki/LlSetPrimitiveParams llSetPrimitiveParams in SecondLife Wiki].
 
* For general information about '''rules''', see [http://wiki.secondlife.com/wiki/LlSetPrimitiveParams llSetPrimitiveParams in SecondLife Wiki].

Revision as of 21:40, 1 July 2011

osSetPrimitiveParams(key prim_uuid, list rules);
  • Sets the parameters for the prim specified by prim_uuid according to rules.
  • This function has the same behave as llSetPrimitiveParams except you can specify target prim anywhere in the scene.
  • For general information about rules, see llSetPrimitiveParams in SecondLife Wiki.
  • Check llSetPrimitiveParams implementation status to see the differences from llSetPrimitiveParams.
  • 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.
  • NOTE: As of OpenSimulator 0.7.1.1, this function don't work, results in script error(#5560). It will be enable on 0.7.2-dev or later.
Threat Level High
Permissions No permissions specified
Extra Delay No function delay specified
Example(s)
// change target_uuid to any uuid of the prim you wish to change visibility by clicking.
string target_uuid = "69031c69-36a5-4031-bdc8-8ca8c37f8eda";
vector default_color;
 
default
{
    state_entry()
    {
        list prim_params = osGetPrimitiveParams(target_uuid, [PRIM_COLOR, ALL_SIDES]);
        default_color = llList2Vector(prim_params, 0);
    }     
 
    touch_start(integer number)
    {
        list rules = [PRIM_NAME, "HIDDEN", PRIM_COLOR, ALL_SIDES, default_color, 0.0];
        osSetPrimitiveParams(target_uuid, rules);
        state alpha;
    }
}
 
state alpha
{
    touch_start(integer number)
    {
        list rules = [PRIM_NAME, "VISIBLE", PRIM_COLOR, ALL_SIDES, default_color, 1.0];
        osSetPrimitiveParams(target_uuid, rules);
        state default;
    }
}
Personal tools
General
About This Wiki