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

From Second Life Wiki
Jump to navigation Jump to search
(Need a better way to deal with multiple purpose commands)
(Second example)
Line 1: Line 1:
{{Template:RLV_Documentation/Command
{{Template:RLV_Documentation/Command
|command=@sit|type=General
|command=@sit|type=# General
 
# Restriction
Restriction
|usage=# @sit:<UUID>=force
|usage=@sit:<UUID>=force
# @sit=<y|n>
 
|purpose=# Forces the target to sit on the inputed object. This is used primarily for catching victims in RLV traps.
@sit=y
# Prevents the target to sit down at all.
 
@sit=n
|purpose=Force-Syntax: Forces the target to sit on the inputed object. This is used primarily for catching victims in RLV traps.
 
Restriction Syntax: Prevents the target to sit down at all.
|version=1.04a
|version=1.04a
|seealso=unsit sittp
|seealso=unsit sittp
Line 25: Line 20:
         llOwnerSay("@sit:"+(string) llGetKey()+"=force");
         llOwnerSay("@sit:"+(string) llGetKey()+"=force");
         llOwnerSay("You have been caught.");
         llOwnerSay("You have been caught.");
    }
}
</lsl>
|example_2=<lsl>integer sit;
default
{
    state_entry()
    {
        sit=TRUE;
    }
    touch_start(integer total_number)
    {
        sit=!sit;
        if(sit==TRUE)
        {
            llOwnerSay("You may now sit down again.");
            llOwnerSay("@sit=y");
        }
        else
        {
            llOwnerSay("You are now prevented from sitting down.");
            llOwnerSay("@sit=n");
        }
     }
     }
}
}
</lsl>
</lsl>
}}
}}

Revision as of 08:18, 7 July 2010


@sit

Type

# General
  1. Restriction

Implemented

Implemented since RLV version 1.04a

Usage

# @sit:<UUID>=force
  1. @sit=<y

Purpose

# Forces the target to sit on the inputed object. This is used primarily for catching victims in RLV traps.
  1. Prevents the target to sit down at all.


See Also

Example 1

<lsl>default

{

   state_entry()
   {
       // set sit position
       llSitTarget(<0,0,0.1>,ZERO_ROTATION);
   }
   touch_start(integer total_number)
   {
       llOwnerSay("@sit:"+(string) llGetKey()+"=force");
       llOwnerSay("You have been caught.");
   }

}

</lsl>

Example 2

<lsl>integer sit;

default {

   state_entry()
   {
       sit=TRUE;
   }
   touch_start(integer total_number)
   {
       sit=!sit;
       if(sit==TRUE)
       {
           llOwnerSay("You may now sit down again.");
           llOwnerSay("@sit=y");
       }
       else
       {
           llOwnerSay("You are now prevented from sitting down.");
           llOwnerSay("@sit=n");
       }
   }

}

</lsl>