LlGetAttachedListFiltered
Looking for the current API? Open the llGetAttachedListFiltered reference →
Function notes
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.
Return value notes
Returns a list of object keys corresponding to public attachments worn by an
avatar in the order they were attached.Specification
Returns a list of attachments on the avatar.
By default this function will return all attachments on all attachment points. A script may specify multiple FILTER_INCLUDE options which will limit the returned attachments to only those listed.
If the script specifies the FILTER_FLAGS option with FILTER_FLAG_HUDS this function will include any attached HUDs if the following conditions are met:
- The script must be compiled with an experience
- The experience must be active in the region
- The avatar must have accepted the experience
- The HUD must include at least one script that was also compiled with the same experience.
| Parameter | Format | Description | |||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
[ FILTER_INCLUDE, integer attachment_point ] | Include attachments on the specified attachment point in the returned results. This parameter may occur multiple times. If it is omitted the function returns attachments on all attachment points. | ||||||||||||||||||||
[ FILTER_FLAGS, integer flags ] | Flags to control filter behavior.
| ||||||||||||||||||||
|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
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
default
{
state_entry()
{
list attachments = llGetAttachedListFiltered(llGetOwner(), [FILTER_INCLUDE, ATTACH_RHAND]);
// Object UUIDs:
llOwnerSay(llList2CSV(attachments));
// Object names:
integer i;
integer max = llGetListLength(attachments);
for (i = 0; i < max; ++i)
{
string name = llList2String(attachments, i);
llOwnerSay(llKey2Name(name));
}
}
}See also: functions
See also: events
Shared wiki helpers
The original page also injects shared parameter notes, caveats or issue information through these helpers. Their conditional MediaWiki logic is not reproduced here; inspect the preserved helper source for additional material.
Original shared helper source (conditional wiki logic is not evaluated)
{{LSL Injection Test}}<noinclude>{{Multi-lang|category=LSL}}</noinclude>{{#if:
{{#vardefine:p_{{{1|none}}}_desc|avatar {{#if:{{{group|}}}|or group}} {{HoverLink|UUID|Universally Unique Identifier}} {{#if:{{{sim|}}}{{{region|}}}|that is in the same [[region]] {{#ifeq:{{{sim|}}}{{{region|}}}|known|or is otherwise known to the region{{Footnote|handle=known}}}}}}}}
{{#vardefine:p_{{{1|none}}}_hover|avatar {{#if:{{{group|}}}|or group}} UUID {{#if:{{{sim|}}}{{{region|}}}|that is in the same region {{#ifeq:{{{sim|}}}{{{region|}}}|known|or is otherwise known to the region}}}}}}
<includeonly>
{{#if:{{{nc|}}}||{{#vardefine:hidden-text|{{#var:hidden-text}}
{{#if:{{#pos:{{#var:moded}}|r}}{{#pos:{{#var:moded}}|u}}||{{LSLC|Avatar/As A Parameter||{{#var:lang}}}}}}
}}}}
</includeonly>
}}<noinclude>
{| {{Prettytable}}
|-{{Hl2}}
! #var
! value
|-
{{VarPair|p_{{{1|none}}}_desc}}
|-
{{VarPair|p_{{{1|none}}}_hover}}
|}
</noinclude>Original wiki source
Some wiki templates and tables need their original context. View this article on the Second Life Wiki. Technical wording and examples are retained from the source; historical guidance may differ from current behavior.