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

From Second Life Wiki
Jump to navigation Jump to search
(first draft)
 
(more explanation)
 
Line 2: Line 2:
|command=@fartouch|type=Restriction
|command=@fartouch|type=Restriction
|usage=@fartouch=<y/n>
|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.
|purpose=This restriction prevents the user from clicking on objects that are further away than 1.5 meters from the avatar's center. This also restricts right clicking on objects and avatars, and left-click-to-sit objects. A useful command to make restraints and cages more realistic, since you can only touch what you can physically reach with your avatar.  
|notes=
|notes=
|version=1.11
|version=1.11

Latest revision as of 03:07, 12 July 2010


@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. This also restricts right clicking on objects and avatars, and left-click-to-sit objects. A useful command to make restraints and cages more realistic, since you can only touch what you can physically reach with your avatar.


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>