OsGetSitActiveRange
From OpenSimulator
(Difference between revisions)
(Add exemple script) |
(Fix Script Title) |
||
(One intermediate revision by one user not shown) | |||
Line 10: | Line 10: | ||
|delay=0 | |delay=0 | ||
|ossl_example=<source lang="lsl"> | |ossl_example=<source lang="lsl"> | ||
− | // Example of | + | // Example of osGetSitActiveRange |
vector target = <0.0, 0.3, 0.55>; | vector target = <0.0, 0.3, 0.55>; | ||
Line 58: | Line 58: | ||
} | } | ||
} | } | ||
+ | </source> | ||
|additional_info=This function was added in 0.9.2.0 | |additional_info=This function was added in 0.9.2.0 | ||
}} | }} |
Latest revision as of 05:46, 8 February 2020
float osGetSitActiveRange()
| |
returns the sit active range of the prim see osSetSitActiveRange
| |
Threat Level | None |
Permissions | Use of this function is always allowed by default |
Extra Delay | 0 seconds |
Example(s) | |
// Example of osGetSitActiveRange vector target = <0.0, 0.3, 0.55>; vector rotate = <0.0, 0.0, 90.0>; float active_range = 5.0; key avatar; debug(string name) { active_range = osGetSitActiveRange(); llOwnerSay("active_range for avatar " + name + " is " + (string)active_range); } default { state_entry() { llUnSit(llAvatarOnSitTarget()); llSetClickAction(CLICK_ACTION_SIT); llSitTarget(target, llEuler2Rot((rotate * DEG_TO_RAD))); osSetSitActiveRange(active_range); } changed(integer change) { if (change & CHANGED_LINK) { key user = llAvatarOnSitTarget(); if (user != NULL_KEY) { avatar = user; debug(osKey2Name(avatar)); } else if (user == NULL_KEY) { debug(osKey2Name(avatar)); avatar = NULL_KEY; } else { llResetScript(); } } } } | |
Notes | |
This function was added in 0.9.2.0 |