Talk:OsGetGender

From OpenSimulator

Revision as of 14:43, 17 May 2023 by Gwyneth Llewelyn (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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