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

From Second Life Wiki
< LSL Protocol‎ | Restrained Living Relay/Other Implementations‎ | Maike Short's Relay
Revision as of 06:03, 15 March 2009 by Maike Short (talk | contribs) (First Multi object, multi prim, multi script version 1.040.a)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to 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.

Code

integer INTERPRIM_CHANNEL = -1373421730;

default {

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

}