Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Stop touching me!

Krazzora Zaftig
Do you have my marbles?
Join date: 20 Aug 2005
Posts: 649
12-06-2006 10:39
I am currently working on an item where I have a touch enabled control base sending link messages to teh rest of an object. Is there any way to make all the other prims in the object NOT touchable so that only the one with the dialog script would be touchable?
_____________________
Ziggy Puff
Registered User
Join date: 15 Jul 2005
Posts: 1,143
12-06-2006 10:57
A couple of things that may or may not help you.

If the touch handler script is in a child prim, I think only that prim responds to touch. If it's in the root prim, the whole object responds to touch. So maybe you could build your object in a way that utilizes this.

I think there's an llPassTouches function or something like that, which does something to this behavior. Look it up... not sure if it applies in your case. I think that might deal with the case where a child prim and the root prim both have touch handlers in their scripts, or something like that.
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
12-06-2006 10:59
Per the wiki:
"To block touches from being passed to the parent prim, the child prim must contain a script with a touch_start, touch, or touch_end event handler.

If the child does not have a touch_start, touch, or touch_end event handler, touches are automatically passed to the parent, whether or not llPassTouches(FALSE) has been set. An empty touch event in the child prim will still allow the prim to be clicked, but will not pass touches on to the parent.

In the absence of one of these three events, all touches will be passed to the parent by default."

So yes, you would have to put a script like this in each child prim:

CODE

default {
touch_start(integer num_detected) {

}
}
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime.
From: someone
I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum
Gearsawe Stonecutter
Over there
Join date: 14 Sep 2005
Posts: 614
12-06-2006 11:04
Another method might be better and have less script running in the object

in your main script have somthing like this in your root prims main script

CODE

touch_start(integer total_number)
{
if (llDetectedLinkNumber(0) == 1 ) // one for the root prim
{
//YOUR CODE HERE
}
}


every child will detect a touch and pass it to the root but the root will just ignore it. This will use less system resources.
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
12-06-2006 11:11
ooooooo very nice Gearsawe. We love less scripts!!!
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime.
From: someone
I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum
Krazzora Zaftig
Do you have my marbles?
Join date: 20 Aug 2005
Posts: 649
12-06-2006 12:37
Thank you all so much I will try them all out and see what they produce. I can't wait to get home now and try these out.
_____________________