llGetAttachedListFiltered
list llGetAttachedListFiltered(key avatar,// UUID of the avatar in the same region.list options// A list of options to filter the returned attachments.
);- Returns
list- Energy
- 10
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.
Returns a list of object keys corresponding to public attachments worn by an avatar in the order they were attached.
list result = llGetAttachedListFiltered(NULL_KEY, []);Specification
Section titled “Specification”FILTER_FLAGS // Flags used to control which attachments are returned.FILTER_INCLUDE // Filter parameter used to include a specific attachment point.
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.
| Constant | Type | Value | Description |
|---|---|---|---|
FILTER_INCLUDE | integer | 1 | |
FILTER_FLAGS | integer | 2 | |
FILTER_FLAG_HUDS | integer | 0x0001 |
| 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.
| ||||||||||||||||||||
Body
|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Caveats
Section titled “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
Section titled “Examples”Example 1
default{ state_entry() { list attachments = llGetAttachedListFiltered(llGetOwner(), [FILTER_INCLUDE, ATTACH_RHAND]);
// Object UUIDs:12 collapsed lines
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
Section titled “See also”Functions
Section titled “Functions”llGetAttachedListllGetAttachedllGetAttachedListllAttachToAvatarllDetachFromAvatarllAttachToAvatarllGetObjectDetails—OBJECT_ATTACHED_POINT
Events
Section titled “Events”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.