Looking for the current API? Open the llGetAttached reference →
Specification
Special Constant Comment ATTACH_ANY_HUD -1 A special constant representing all HUD attachment points when filtering.
Examples default
{
attach(key id)
{
if(id)//it's attached
{
if(llGetAttached() != ATTACH_LHAND)
{
llOwnerSay("Please attach me only to the left hand");
llRequestPermissions(id, PERMISSION_ATTACH);
}
}
}
run_time_permissions(integer a)
{
if(a & PERMISSION_ATTACH)
llDetachFromAvatar();
}
}
This snippet will make a prim invisible when attached, but visible when rezzed unattached
on_rez(integer p)
{
// !llGetAttached() has the value 0 when attached, and 1 when unattached
llSetAlpha( !llGetAttached(), ALL_SIDES);
}
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.
From the Second Life Wiki Community documentation adapted from LlGetAttached , by Linden Research, Inc. and contributing residents.View contributors and history .
Built from these wiki pages, as imported:
Licensed under CC BY-SA 3.0 . Last wiki edit: 2024-11-06 .Formatting and links have been adapted for this site; API metadata follows the LSL definitions.