LSL Protocol/Restrained Living Relay/Other Implementations/Maike Short's Relay/Toucher

From Second Life Wiki
Jump to: navigation, search

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.


<lsl> integer INTERPRIM_CHANNEL = -1373421730;

default {

   state_entry() {
   touch_start(integer i) {
       llMessageLinked(LINK_SET, INTERPRIM_CHANNEL, "touch", llDetectedKey(0));

} </lsl>