From Second Life Wiki
AttachToAvatar
llAttachToAvatar
Description
Function: llAttachToAvatar( integer attachment );
Attaches the object to the avatar who has granted permission to the script. The object is taken into the users inventory and attached to the attach point attachment.
| • integer
| attachment
| –
| ATTACH_* constant or valid value (see the tables below)
|
|
Requires the PERMISSION_ATTACH permission, granted by the owner, to run.
Caveats
- Do not depend upon the auto-grant status of permissions. Always use the run_time_permissions event.
- If the script lacks the permission PERMISSION_ATTACH, the script will shout an error on DEBUG_CHANNEL and the operation fails (but the script continues to run).
- If PERMISSION_ATTACH is granted by anyone other then the owner then when the function is called an error will be shouted on DEBUG_CHANNEL.
- Once the PERMISSION_ATTACH permission is granted there is no way to revoke it. The script will only loose the permission if it is reset or the object derezzed (deleted, detached, or taken).
- The call will fail if the avatar is not the owner of the object being attached, even if PERMISSION_ATTACH has been properly granted.
- Two objects cannot be attached to the same attachment point at the same time.
- Objects attached to the head (and any attachment position within the head) will not be visible in First Person view (aka Mouselook) if "show attachments in mouselook" is disable.
See Also
Events
Functions
Articles