Difference between revisions of "LSL Protocol/Restrained Living Relay/Other Implementations/Maike Short's Relay/Toucher"
Maike Short (talk | contribs) m (First Multi object, multi prim, multi script version 1.040.a) |
m (moved LSL Protocol/Restrained Life Relay/Other Implementations/Maike Short's Relay/Toucher to LSL Protocol/Restrained Living Relay/Other Implementations/Maike Short's Relay/Toucher) |
||
(One intermediate revision by one other user not shown) | |||
Line 13: | Line 13: | ||
== Code == | == Code == | ||
<lsl> | |||
integer INTERPRIM_CHANNEL = -1373421730; | integer INTERPRIM_CHANNEL = -1373421730; | ||
Line 24: | Line 25: | ||
} | } | ||
} | } | ||
</lsl> |
Latest revision as of 11:23, 25 February 2010
Back to Maike Short's Relay.
Tasks of this script
There is a situation in which it is desirable to suppress touch events to the root prim: The Lockable script handles them and displays the standard dialog of the Real Restraints. This script, however, can be used by the Extended Controller to enable struggling, squirming and tugging your way out.
So in this case we do not want to see that dialog ever. The workaround is this: The Extended Controller and Lockable script are put into the root prim. The root prim, however, is totally covered by another prim. This prim does not forward touch events to the root prim but sends an linked message instead.
Note: This script is required in the !vision (and @thirdview) prim as well.
Code
<lsl> integer INTERPRIM_CHANNEL = -1373421730;
default {
state_entry() { llPassTouches(FALSE); }
touch_start(integer i) { llMessageLinked(LINK_SET, INTERPRIM_CHANNEL, "touch", llDetectedKey(0)); }
} </lsl>