User:Toy Wylie/RLV Documentation/defaultwear

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


@defaultwear

Type

Restriction

Implemented

Implemented since RLV version 1.21

Usage

@defaultwear=<y/n>

Purpose

Disables the "Wear" context menu item. When an item is locked on your avatar you can still use the "Wear" menu item to kick the locked object off and replace it with another that has its default attachment spot in the same place as the locked object. RLV will try and restore the locked object after a short while. However, detaching might have other consequences, like lifting restrictions, resetting the attachment or notifying a possible key owner. Enabling this restriction removes the "Wear" menu item and prevents this from happening. Only items in #RLV that have a proper attachment spot in their name will keep the "Wear" option enabled.


See Also

Shared Object Tutorial

Example

<lsl>integer mode;

default {

   on_rez(integer num)
   {
       llResetScript();
   }

   state_entry()
   {
       llOwnerSay("@defaultwear=n");
       llOwnerSay("The 'Wear' menu item is now disabled if you have at least one locked object on your avatar.");
   }

   touch_start(integer num)
   {
       if(llDetectedKey(0)==llGetOwner())
       {
           llOwnerSay("@defaultwear=y");
           llOwnerSay("The 'Wear' menu item has been restored.");
       }
   }

}

</lsl>