Difference between revisions of "LSL Protocol/Restrained Living Relay/Other Implementations/Maike Short's Relay/Toucher"
Maike Short (talk | contribs) m (wiki syntax fix) |
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) |
(No difference)
|
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>