User:Toy Wylie/RLV Documentation/edit

From Second Life Wiki
Jump to navigation Jump to search


@edit

Type

Restriction

Implemented

Implemented since RLV version 1.03

Usage

@edit=<y/n>

Purpose

This restriction prevents the user from editing objects. The build window will close if it was open, and the user will be unable to open it again, until the restriction is lifted. Additionally, the ability to see transparent objects by using CTRL ALT T will be removed as well.


See Also

Example

<lsl>integer edit;

default {

   on_rez(integer num)
   {
       llResetScript();
   }

   state_entry()
   {
       edit=TRUE;
       llOwnerSay("Touch me to change the restrictions applied to you.");
   }

   touch_start(integer num)
   {
       if(llDetectedKey(0)==llGetOwner())
       {
           edit=!edit;
           if(edit==TRUE)
           {
               llOwnerSay("@edit=y");
               llOwnerSay("You can now edit objects once again.");
           }
           else
           {
               llOwnerSay("@edit=n");
               llOwnerSay("Editing objects is now restricted.");
           }
       }
   }

}

</lsl>