Difference between revisions of "LlGetAttachedList"

From Second Life Wiki
Jump to navigation Jump to search
(Removed section Constants because they are not used in this function.)
(2 intermediate revisions by 2 users not shown)
Line 8: Line 8:
|func_desc
|func_desc
|p1_type=key|p1_name=avatar|p1_desc
|p1_type=key|p1_name=avatar|p1_desc
|return_type=list|return_text=of public attachments worn by an {{LSLPT|avatar}}.
|return_type=list|return_text=of object keys corresponding to public attachments worn by an {{LSLPT|avatar}}.
|func_footnote=By design HUD attachment keys are not reported by this function.
|func_footnote=By design HUD attachment keys are not reported by this function.<br/> <br/>
|constants={{LSL_Constants_Attachment|NoHud=*}}
If avatar is a child agent, ["NOT ON REGION"] is returned.<br/>
If avatar is not a main agent and not a child agent or not an agent at all, ["NOT FOUND"] is returned.
|spec
|spec
|caveats
|caveats
Line 34: Line 35:
</source>
</source>
|spec
|spec
|constants
|helpers
|helpers
|also_functions={{LSL DefineRow||[[llGetAttached]]}}
|also_functions={{LSL DefineRow||[[llGetAttached]]}}

Revision as of 10:52, 20 July 2018

Summary

Function: list llGetAttachedList( key avatar );

Returns a list of object keys corresponding to 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.

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 );