Difference between revisions of "User:Toy Wylie/RLV Documentation/clear"

From Second Life Wiki
Jump to navigation Jump to search
(First draft)
 
(added the clear pattern option)
 
(7 intermediate revisions by the same user not shown)
Line 1: Line 1:
== @clear ==
{{Template:RLV_Documentation/Command
 
|command=@clear|type=General
= Purpose =
|usage=@clear[=<string>]
 
|purpose=If no string is provided this command releases all restrictions placed on the avatar by this object. This is useful and recommended when your object is supposed to release the user completely. Rather than removing each restriction one by one and possibly forgetting one of them, the usage of @clear should be considered. Adding a string parameter will only release the restrictions that contain the string. So @clear=sit will clear @sittp, @unsit and @sit restrictions.
Releases all restrictions placed on the avatar by this object.
|version=1.04a
 
|seealso=
= Example =
|example=<lsl>lock()
 
<lsl>
 
lock()
{
{
     llOwnerSay("@detach=n,sendchat=n,emote=add");
     llOwnerSay("@detach=n,sendchat=n,emote=add");
Line 42: Line 38:
         }
         }
     }
     }
}
}</lsl>
 
}}
</lsl>

Latest revision as of 16:05, 7 July 2010


@clear

Type

General

Implemented

Implemented since RLV version 1.04a

Usage

@clear[=<string>]

Purpose

If no string is provided this command releases all restrictions placed on the avatar by this object. This is useful and recommended when your object is supposed to release the user completely. Rather than removing each restriction one by one and possibly forgetting one of them, the usage of @clear should be considered. Adding a string parameter will only release the restrictions that contain the string. So @clear=sit will clear @sittp, @unsit and @sit restrictions.


See Also

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>