Difference between revisions of "User:Toy Wylie/RLV Documentation/sit"
Jump to navigation
Jump to search
(Created page with '{{Template:RLV_Documentation/Command |command=@sit|type=Interaction |usage=@sit |purpose=Forces the target to sit on the inputed object. This is used primaraly for catching victi...') |
(added cases where @sit might fail) |
||
(4 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{Template:RLV_Documentation/Command | {{Template:RLV_Documentation/Command | ||
|command=@sit|type= | |command=@sit|type=# General | ||
|usage=@sit | # Restriction | ||
|purpose=Forces the target to sit on the inputed object. This is used | |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. The object needs to have a sit target defined, otherwise it won't work reliably. This command does not work when the victim is prevented from unsitting and currently sitting down, or if the victim has a @sittp restriction set and the object is more than 1.5 meters away. | |||
# Prevents the target to sit down at all. | |||
|version=1.04a | |version=1.04a | ||
|seealso= | |seealso=unsit sittp | ||
|example=<lsl>integer | |example=<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 | default | ||
Line 11: | Line 29: | ||
state_entry() | state_entry() | ||
{ | { | ||
sit=TRUE; | |||
} | } | ||
touch_start(integer total_number) | 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> | ||
}} | }} |
Latest revision as of 04:12, 12 July 2010
@sit
Type
# General
- Restriction
Implemented
Implemented since RLV version 1.04a
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. The object needs to have a sit target defined, otherwise it won't work reliably. This command does not work when the victim is prevented from unsitting and currently sitting down, or if the victim has a @sittp restriction set and the object is more than 1.5 meters away.
- Prevents the target to sit down at all.
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>