Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

how can I make prims untouchable ?

Dominique Laville
Registered User
Join date: 24 Apr 2008
Posts: 84
06-08-2008 07:03
Hi,

there is a way to make prims untouchable ?

i.e. I have 2 prims A and B.

- A is in front of B
- A is "untouchable" so if I try to click on A, I'm going to click B

Is it possible ?

thanks
Xhawkx Holden
Registered User
Join date: 1 Nov 2006
Posts: 86
06-08-2008 07:14
I don't believe this is possible.
Viktoria Dovgal
Join date: 29 Jul 2007
Posts: 3,593
06-08-2008 07:15
inside your touch_start/touch etc. handler, you can use the llDetectedLinkNumber function to find out what prim was touched. So, you can ignore touches, or pretend that another prim was touched if the "wrong" one is detected.
_____________________
Dora Gustafson
Registered User
Join date: 13 Mar 2007
Posts: 779
06-08-2008 07:20
You can do that, if the prims are linked. Put this script in your B prim, the root:
CODE

default
{
touch_start(integer num_detected)
{
if ( llDetectedLinkNumber(0) == 1 ) llWhisper( PUBLIC_CHANNEL, "B was touched" );
else if ( llDetectedLinkNumber(0) == 2 ) llWhisper( PUBLIC_CHANNEL, "A was touched" );
}
}
_____________________
From Studio Dora
Ollj Oh
Registered User
Join date: 28 Aug 2007
Posts: 522
06-08-2008 08:11
there is a parameter that sets if a child prim forwards a touch to linknumber 1 or not.
Dora Gustafson
Registered User
Join date: 13 Mar 2007
Posts: 779
06-08-2008 08:34
From: Ollj Oh
there is a parameter that sets if a child prim forwards a touch to linknumber 1 or not.

Yes it is: llPassTouches( TRUE );
It is set TRUE by default.
If set FALSE the child must have it's own event handler
_____________________
From Studio Dora
Cherry Hainsworth
Registered User
Join date: 31 Jul 2006
Posts: 125
06-08-2008 17:30
From: Dora Gustafson
Yes it is: llPassTouches( TRUE );
It is set TRUE by default.
If set FALSE the child must have it's own event handler


Surely the OP could simply put a touch event in root prim B and no event in child prim A?

Cherry ;)
_____________________
=================
My stuff on XSt:-
http://tinyurl.com/383mgh
Yumi Murakami
DoIt!AttachTheEarOfACat!
Join date: 27 Sep 2005
Posts: 6,860
06-08-2008 19:04
If you mean that the two prims are part of the same object, you can do it as described above with scripts in each object. But also, there's no real need to do it in the simple situation you've described above. You can turn prim A transparent, and then if it is clicked, behave as if the user clicked B, and the user experience will be identical. Of course your real problem is probably more complex than the example but I just thought I should mention that. :)
Viktoria Dovgal
Join date: 29 Jul 2007
Posts: 3,593
06-08-2008 21:50
From: Cherry Hainsworth
Surely the OP could simply put a touch event in root prim B and no event in child prim A?

Yep, but there was also some earlier concern about script permission requests and all that fun. Whatever this construction is, it seems to be complicated, and the more you wander away from simple devices, the more restrictions LSL piles on your head :o
_____________________
Dora Gustafson
Registered User
Join date: 13 Mar 2007
Posts: 779
06-09-2008 01:33
From: Cherry Hainsworth
Surely the OP could simply put a touch event in root prim B and no event in child prim A?

Cherry ;)

Certainly! was it not what I suggested in my first entry?
_____________________
From Studio Dora
Atom Burma
Registered User
Join date: 30 May 2006
Posts: 685
06-09-2008 03:07
Suprised that nobody suggested an owner only string. That would make it totally untouchable to the public. Simply anyway.
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
06-09-2008 08:49
From the wording of the question it sounds like what the OP wants is to make one prim "transparent" to touches. As far as I know the only way to do that is to use an inside-out sphere (I believe that's a 180-degree twist at both ends). That doesn't make it COMPLETELY transparent to touches, but it makes it so that you actually touch the FAR surface, so any prims on the inside are "closer" as far as touches go.
Cherry Hainsworth
Registered User
Join date: 31 Jul 2006
Posts: 125
06-09-2008 16:46
From: Dora Gustafson
Certainly! was it not what I suggested in my first entry?

Yup :)
I just interpreted a bit ....
Cherry.
_____________________
=================
My stuff on XSt:-
http://tinyurl.com/383mgh
Luke Poplin
Registered User
Join date: 2 Feb 2007
Posts: 32
06-10-2008 07:39
Let’s approach this a little differently.

Forget about making “A” untouchable and just have it pretend to be “B”. To clarify, if “A” is touched, it performs the same function as “B”.

Example:

CODE

touch_start(integer total_number)
{
string where = llGetLinkName( llDetectedLinkNumber(0) );

if(where == “A”)
{
llSay(0, “B was touched.”);
}
else if(where == “B”)
{
llSay(0, “B was touched.”);
}
}