Talk:OsGetGender

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
(Equivalent in pure LSL: new section)

Revision as of 15:43, 17 May 2023

Equivalent in pure LSL

In pure LSL this can be accomplished with:

string getGender(key id)
{
    list out = llGetObjectDetails(avatar, [OBJECT_BODY_SHAPE_TYPE]);
    float shape = llList2Float(out, 0);
    if (shape == -1.0)
    {
        // avatar out of range, invalid UUID, or id is not an avatar:
        return "unknown";
    }
    if (shape < 0.5)
    {
        return "female";
    }
    return "male";
}

See the LSL Wiki.

Gwyneth Llewelyn (talk) 15:43, 17 May 2023 (PDT)

Personal tools
General
About This Wiki