Krazzora Zaftig
Do you have my marbles?
Join date: 20 Aug 2005
Posts: 649
|
11-23-2005 18:59
Ok all jokes aside: I have a two prim Item where I want it so that if one prim is touched it does one thing and if the other prim is touched it does another function. These two scripts are not needed for the other to run. If I put a touch script in a prim would it not make the entire object touch or just that one prim?
|
Gabe Lippmann
"Phone's ringing, Dude."
Join date: 14 Jun 2004
Posts: 4,219
|
11-23-2005 19:25
I can't answer your question. Prim touching is immoral. 
_____________________
go to Nocturnal Threads 
|
Krazzora Zaftig
Do you have my marbles?
Join date: 20 Aug 2005
Posts: 649
|
11-23-2005 19:54
From: Gabe Lippmann I can't answer your question. Prim touching is immoral.  But you said it felt good last night.
|
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
|
11-23-2005 20:04
*sings* When I think about you, I touch myself *sings*
just put a touch script in each prim.
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river. - Cyril Connolly
Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence. - James Nachtwey
|
Bounder Jimenez
programmer/designer
Join date: 12 Oct 2005
Posts: 45
|
11-23-2005 20:29
You can determine which prim was touched by using llDetectedLinkNumber(0) in your script. Also look at llPassTouches as this can let a script run in the touched prim as well as being passed to the master script in the base prim.
So, if there is a script with touch processing in a prim, only that script will process the touch unless you have llPassTouches(TRUE) set. However, if it is the base prim, it will also process touches of other prims unless you specifically block them with if(llDetectedLinkNumber(0)==1) { // process touch } else { // blocked }
|
October Brotherhood
Registered User
Join date: 24 Jun 2005
Posts: 70
|
11-23-2005 20:31
dang, i cam runnin in here to make a good touch bad touch joke, but it appears i'm too late hehe.
i use the llDetectedLinkNumber with a say to find out the link numbers and then in the root i use linkmessage to talk to individual prims and llDetectedlinknumber to do different things for each part touched.
|
Rodrick Harrington
Registered User
Join date: 9 Jul 2005
Posts: 150
|
11-24-2005 00:15
my experience has been that if a touch script is in a child prim . . . only that child prim will fire a touch event on touch. If it's in the root prim . . . any touch to any prim in the linkset will fire the touch events.
|