LlGetAttachedList

From Second Life Wiki
Jump to: navigation, search

Summary

Function: list llGetAttachedList( key avatar );

Returns a list of public attachments worn by an avatar.

• key avatar avatar UUID that is in the same region

By design HUD attachment keys are not reported by this function.

If avatar is a child agent, ["NOT ON REGION"] is returned.
If avatar is not a main agent and not a child agent or not an agent at all, ["NOT FOUND"] is returned.

KBnote.png Note: Constants in italic require a viewer compatible with the Project Bento skeleton.
Constant # Comment
ATTACH_HEAD 2 head
ATTACH_NOSE 17 nose
ATTACH_MOUTH 11 mouth
ATTACH_FACE_TONGUE 52 tongue
ATTACH_CHIN 12 chin
ATTACH_FACE_JAW 47 jaw
ATTACH_LEAR 13 left ear
ATTACH_REAR 14 right ear
ATTACH_FACE_LEAR 48 left ear (extended)
ATTACH_FACE_REAR 49 right ear (extended)
ATTACH_LEYE 15 left eye
ATTACH_REYE 16 right eye
ATTACH_FACE_LEYE 50 left eye (extended)
ATTACH_FACE_REYE 51 right eye (extended)
ATTACH_NECK 39 neck
ATTACH_LSHOULDER 3 left shoulder
ATTACH_RSHOULDER 4 right shoulder
ATTACH_LUARM 20 left upper arm
ATTACH_RUARM 18 right upper arm
ATTACH_LLARM 21 left lower arm
ATTACH_RLARM 19 right lower arm
ATTACH_LHAND 5 left hand
ATTACH_RHAND 6 right hand
ATTACH_LHAND_RING1 41 left ring finger
ATTACH_RHAND_RING1 42 right ring finger
ATTACH_LWING 45 left wing
ATTACH_RWING 46 right wing
ATTACH_CHEST 1 chest/sternum
ATTACH_LEFT_PEC 29 left pectoral
ATTACH_RIGHT_PEC 30 right pectoral
ATTACH_BELLY 28 belly/stomach/tummy
ATTACH_BACK 9 back
ATTACH_TAIL_BASE 43 tail base
ATTACH_TAIL_TIP 44 tail tip
ATTACH_AVATAR_CENTER 40 avatar center/root
ATTACH_PELVIS 10 pelvis
ATTACH_GROIN 53 groin
ATTACH_LHIP 25 left hip
ATTACH_RHIP 22 right hip
ATTACH_LULEG 26 left upper leg
ATTACH_RULEG 23 right upper leg
ATTACH_RLLEG 24 right lower leg
ATTACH_LLLEG 27 left lower leg
ATTACH_LFOOT 7 left foot
ATTACH_RFOOT 8 right foot
ATTACH_HIND_LFOOT 54 left hind foot
ATTACH_HIND_RFOOT 55 right hind foot

Examples

// Touch to list all attachments
 
default
{
    touch_start(integer total_number)
    {
        list AttachedNames;
        list AttachedUUIDs = llGetAttachedList(llDetectedKey(0));
        integer i;
        while (i < llGetListLength(AttachedUUIDs) )
        {
            list temp = llGetObjectDetails(llList2Key(AttachedUUIDs,i),[OBJECT_NAME]);
            AttachedNames += [llList2String(temp,0)];
            ++i;
        }
        llSay(PUBLIC_CHANNEL,"\n" + llDumpList2String(AttachedNames,"\n"));
    }
}

See Also

Deep Notes

History

• 20/Dec/08 SVC-3560 llQueryAvatarAttachments Suggested
• 30/Apr/13 BUG-2467 llGetAttachedList Suggested
• 14/Jul/15 BUG-9683 llGetAttachedList Suggested again

Search JIRA for related Issues

Signature

function list llGetAttachedList( key avatar );