User:Toy Wylie/RLV Documentation/fartouch

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


@fartouch

Type

Restriction

Implemented

Implemented since RLV version 1.11

Usage

@fartouch=<y/n>

Purpose

This restriction prevents the user from clicking on objects that are further away than 1.5 meters from the avatar's center.


See Also

Example

<lsl>integer fartouch;

default {

   on_rez(integer num)
   {
       llResetScript();
   }

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

   touch_start(integer num)
   {
       if(llDetectedKey(0)==llGetOwner())
       {
           fartouch=!fartouch;

           if(fartouch==TRUE)
           {
               llOwnerSay("@fartouch=y");
               llOwnerSay("You can now touch far away objects once again.");
           }
           else
           {
               llOwnerSay("@fartouch=n");
               llOwnerSay("Touching far away objects is now restricted.");
           }
       }
   }

}

</lsl>