User:Toy Wylie/RLV Documentation/clear

From Second Life Wiki
< User:Toy Wylie‎ | RLV Documentation
Revision as of 08:25, 6 July 2010 by Toy Wylie (talk | contribs) (First draft)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

@clear

Purpose

Releases all restrictions placed on the avatar by this object.

Example

<lsl>

lock() {

   llOwnerSay("@detach=n,sendchat=n,emote=add");
   llOwnerSay("Your attachment is now locked on, and you can't chat anymore. Touch it to unlock.");

}

default {

   on_rez(integer num)
   {
       llResetScript();
   }
   state_entry()
   {
       if(llGetAttached()!=0)
           lock();
   }
   attach(key id)
   {
       if(id!=NULL_KEY)
           lock();
   }
   touch_start(integer num)
   {
       if(llDetectedKey(0)==llGetOwner())
       {
           llOwnerSay("@clear");
           llOwnerSay("Your attachment is now unlocked, and all restrictions are lifted.");
       }
   }

}

</lsl>