Difference between revisions of "LlGetAttachedList"
Jump to navigation
Jump to search
m (List of keys returned is ordered by rez/attach time from oldest to newest.) |
Rider Linden (talk | contribs) |
||
Line 3: | Line 3: | ||
{{LSL_Function/avatar|avatar|sim=*}} | {{LSL_Function/avatar|avatar|sim=*}} | ||
|func_id=? | |func_id=? | ||
|func_sleep | |func_sleep=0.0 | ||
|func_energy | |func_energy=10.0 | ||
|func=llGetAttachedList | |func=llGetAttachedList | ||
|func_desc | |func_desc |
Latest revision as of 14:03, 6 November 2024
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
Summary
Function: list llGetAttachedList( key avatar );0.0 | Forced Delay |
10.0 | Energy |
Returns a list of object keys corresponding to public attachments worn by an avatar in the order they were attached.
• 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.
Caveats
When an avatar first arrives in a region, there is a brief period when their attachments are not yet fully rezzed or added. During this time, those attachments will not appear in the results.
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
Events
• | attach |
Functions
• | llGetAttached | |||
• | llAttachToAvatar | |||
• | llDetachFromAvatar | |||
• | llAttachToAvatar | |||
• | llGetObjectDetails | – | OBJECT_ATTACHED_POINT |