From Second Life Wiki
Template:Needs Translation/LSL/es
Template:Needs Translation/LSL/el
Template:Needs Translation/LSL/he
Template:Needs Translation/LSL/it
Template:Needs Translation/LSL/ko
Template:Needs Translation/LSL/nl
Template:Needs Translation/LSL/hu
Template:Needs Translation/LSL/no
Template:Needs Translation/LSL/da
Template:Needs Translation/LSL/sv
Template:Needs Translation/LSL/tr
Template:Needs Translation/LSL/pl
Template:Needs Translation/LSL/pt
Template:Needs Translation/LSL/ru
Template:Needs Translation/LSL/uk
Template:Needs Translation/LSL/zh-Hans
Template:Needs Translation/LSL/zh-Hant
/LSL
DetachFromAvatar
llDetachFromAvatar
Summary
Function: llDetachFromAvatar( );
Detach object from avatar.
Requires the PERMISSION_ATTACH permission, granted by the owner, to run.
The detached object remains in the user's inventory.
Examples
default
{
attach(key AvatarKey)
{//give instructions for use and prevent item from being attached to avatar
if(AvatarKey)
{//event is called on both attach and detatch, but Key is only valid on attach
llOwnerSay ("
We hope you will enjoy your purchase,
but if you really want to use this item properly, you should:
1) drag it from your inventory to the ground
2) Right click on it and select \"open\"
3) copy its contents to inventory.");
llRequestPermissions(AvatarKey, PERMISSION_ATTACH );
}
}
run_time_permissions(integer perm)
{
if(perm & PERMISSION_ATTACH)
{
llDetachFromAvatar( );
}
}
}
Notes
There is no way to delete an attachment with a script or to drop it to the ground.
See Also
Events
Functions
Articles