<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://wiki.osgrid.org/index.php?action=history&amp;feed=atom&amp;title=LlDetachFromAvatar</id>
	<title>LlDetachFromAvatar - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.osgrid.org/index.php?action=history&amp;feed=atom&amp;title=LlDetachFromAvatar"/>
	<link rel="alternate" type="text/html" href="http://wiki.osgrid.org/index.php?title=LlDetachFromAvatar&amp;action=history"/>
	<updated>2026-10-25T11:08:44Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.11</generator>
	<entry>
		<id>http://wiki.osgrid.org/index.php?title=LlDetachFromAvatar&amp;diff=84&amp;oldid=prev</id>
		<title>Osgridadmin: /* Function: llDetachFromAvatar( ); */</title>
		<link rel="alternate" type="text/html" href="http://wiki.osgrid.org/index.php?title=LlDetachFromAvatar&amp;diff=84&amp;oldid=prev"/>
		<updated>2017-12-30T16:35:58Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Function: llDetachFromAvatar( );&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Function: llDetachFromAvatar( );==&lt;br /&gt;
Detach object from avatar. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Requires the [[PERMISSION_ATTACH]] permission, granted by the owner, to run.&lt;br /&gt;
The detached object remains in the user&amp;#039;s inventory.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Caveats&amp;#039;&amp;#039;&amp;#039; &amp;lt;br&amp;gt;&lt;br /&gt;
•  Do not depend upon the auto-grant status of permissions. Always use the [[run_time_permissions]] event. &amp;lt;br&amp;gt;&lt;br /&gt;
• 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). &amp;lt;br&amp;gt;&lt;br /&gt;
• If [[PERMISSION_ATTACH]] is granted by anyone other than the owner, then when the function is called an error will be shouted on [[DEBUG_CHANNEL]]. &amp;lt;br&amp;gt;&lt;br /&gt;
• Once the [[PERMISSION_ATTACH]] permission is granted there is no way to revoke it. The script will only lose the permission if it is reset or the object derezzed (deleted, detached, or taken).  &amp;lt;br&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Examples&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
|&amp;lt;source lang=&amp;quot;lsl&amp;quot;&amp;gt;&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
    attach(key AvatarKey)&lt;br /&gt;
    {//give instructions for use and prevent item from being attached to avatar&lt;br /&gt;
        if(AvatarKey)&lt;br /&gt;
        {//event is called on both attach and detatch, but Key is only valid on attach&lt;br /&gt;
            llOwnerSay (&amp;quot;&lt;br /&gt;
            We hope you will enjoy your purchase, &lt;br /&gt;
            but if you really want to use this item properly, you should: &lt;br /&gt;
            1) drag it from your inventory to the ground &lt;br /&gt;
            2) Right click on it and select \&amp;quot;open\&amp;quot;&lt;br /&gt;
            3) copy its contents to inventory.&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
            llRequestPermissions(AvatarKey, PERMISSION_ATTACH );&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    run_time_permissions(integer perm)&lt;br /&gt;
    {&lt;br /&gt;
        if(perm &amp;amp; PERMISSION_ATTACH)&lt;br /&gt;
        {&lt;br /&gt;
            llDetachFromAvatar( );&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Notes&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;br /&gt;
There is no way to delete an attachment with a script or to drop it to the ground.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
See Also &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Events&amp;#039;&amp;#039;&amp;#039; &amp;lt;br&amp;gt;&lt;br /&gt;
•  	[[run_time_permissions]] 	– 	Permission receiving event 	 &amp;lt;br&amp;gt;&lt;br /&gt;
•  	[[attach]] 		 &amp;lt;br&amp;gt;	&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Functions&amp;#039;&amp;#039;&amp;#039; &amp;lt;br&amp;gt;&lt;br /&gt;
•  	[[llGetPermissions]] 	– 	Get the permissions granted  &amp;lt;br&amp;gt;	&lt;br /&gt;
•  	[[llGetPermissionsKey]] 	– 	Get the agent who granted permissions 	 &amp;lt;br&amp;gt;&lt;br /&gt;
•  	[[llRequestPermissions]] 	– 	Request permissions 	 &amp;lt;br&amp;gt;&lt;br /&gt;
•  	[[llAttachToAvatar]] 	 &amp;lt;br&amp;gt;		&lt;br /&gt;
•  	[[llGetAttached]] 	 &amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Osgridadmin</name></author>
	</entry>
</feed>