OsGetGender
From OpenSimulator
(Difference between revisions)
Line 4: | Line 4: | ||
|delay=0 | |delay=0 | ||
|function_syntax=string osGetGender(key id) | |function_syntax=string osGetGender(key id) | ||
+ | |||
+ | |description=Returns a string with one of the following values: "male", "female", or "unknown". | ||
+ | |||
+ | This value is determined by the value selected for the avatar shape in the appearance dialog in the user's viewer. | ||
+ | |||
+ | If that value cannot be found for any reason (avatar is not in the region, improperly formatted key, etc.), "unknown" is returned. | ||
+ | |||
+ | |additional_info=This function was added in 0.8.2-post-fixes | ||
+ | |||
|ossl_example=<source lang="lsl"> | |ossl_example=<source lang="lsl"> | ||
// | // | ||
Line 23: | Line 32: | ||
} | } | ||
</source> | </source> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
}} | }} |
Revision as of 05:39, 11 January 2021
string osGetGender(key id)
| |
Returns a string with one of the following values: "male", "female", or "unknown".
This value is determined by the value selected for the avatar shape in the appearance dialog in the user's viewer. If that value cannot be found for any reason (avatar is not in the region, improperly formatted key, etc.), "unknown" is returned. | |
Threat Level | None |
Permissions | Use of this function is always allowed by default |
Extra Delay | 0 seconds |
Example(s) | |
// // osGetGender Script Example // default { state_entry() { llSay(PUBLIC_CHANNEL, "Touch to see osGetGender usage."); } touch_start(integer number) { string gender = osGetGender(llDetectedKey(0)); llSay(PUBLIC_CHANNEL, "Your gender is: " + gender); } } | |
Notes | |
This function was added in 0.8.2-post-fixes |