User:Toy Wylie/RLV Documentation/fartouch
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. 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>