OsSetPrimitiveParams: Difference between revisions
From OpenSimulator
Jump to navigationJump to search
imported>Kcozens m Updated threat level to match OSSL_Api.cs |
imported>Ubit No edit summary |
||
| Line 4: | Line 4: | ||
|delay=0 | |delay=0 | ||
|additional_info=This function was added in 0.7 | |additional_info=This function was added in 0.7 | ||
|function_syntax= | |function_syntax= osSetPrimitiveParams(key prim, list rules) | ||
|ossl_example=<source lang="lsl"> | |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. | ||
Revision as of 00:26, 2 May 2019
osSetPrimitiveParams(key prim, list rules)
| |
| |
| Threat Level | None |
| Permissions | Use of this function is always disabled by default |
| Extra Delay | 0 seconds |
| 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;
}
}
| |
| Notes | |
| This function was added in 0.7 | |