|
IBME Swindlehurst
Registered User
Join date: 5 Mar 2007
Posts: 139
|
04-03-2007 13:54
llDetectedLinkNumber(number) always returns 0 regardless of which linked prim is touched. Anyone have any ideas? Here is a simple example: ------------------------------------------------------------------------------------------------- integer linkNumber=10; default { state_entry() { llSay(0, "Hello, Avatar!"  ; } touch_start(integer total_number) { llSay(0, "Touched." ); llWhisper(0,"Touch Event from " + (string)llDetectedLinkNumber(linkNumber)); } } ------------------------------------------------------------------------------------------------- I've tried it in the parent prim and I've tried it in the child prims. It always returns 0. Thanks in advance for any hep/guidance.
|
|
Seifert Surface
Mathematician
Join date: 14 Jun 2005
Posts: 912
|
04-03-2007 14:03
The llDetected functions take input an integer which indexes which avatar is touching (or colliding, etc). If there is only one avatar touching then the number should be 0.
_____________________
-Seifert Surface 2G!tGLf 2nLt9cG
|
|
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
|
04-03-2007 14:19
From: IBME Swindlehurst llDetectedLinkNumber(number) always returns 0 regardless of which linked prim is touched. Anyone have any ideas? Here is a simple example: ------------------------------------------------------------------------------------------------- integer linkNumber=10; default { state_entry() { llSay(0, "Hello, Avatar!"  ; } touch_start(integer total_number) { llSay(0, "Touched." ); llWhisper(0,"Touch Event from " + (string)llDetectedLinkNumber(linkNumber)); } } ------------------------------------------------------------------------------------------------- I've tried it in the parent prim and I've tried it in the child prims. It always returns 0. Thanks in advance for any hep/guidance. Errr, You are requesting llDetectedLinkNumber(10) which unless 10 ppl are touching it at once wont be valid. default { touch_start(integer total_number) { llOwnerSay("Touch Event from " + (string)llDetectedLinkNumber(0)); } }
|
|
Destiny Niles
Registered User
Join date: 23 Aug 2006
Posts: 949
|
04-03-2007 14:25
The documentation in the wiki is not very good for this function but try using 0 in the llDetectedLinkNumber function.
|
|
IBME Swindlehurst
Registered User
Join date: 5 Mar 2007
Posts: 139
|
04-03-2007 14:43
I thought llDetectectedLinkNumber (in the parent prim) would give the link number of which child prim was touched. That is what I'm really looking for. Any hints?
|
|
Destiny Niles
Registered User
Join date: 23 Aug 2006
Posts: 949
|
04-03-2007 14:47
Newgate already gave you the answer. From: Newgate Ludd Errr, You are requesting llDetectedLinkNumber(10) which unless 10 ppl are touching it at once wont be valid. default { touch_start(integer total_number) { llOwnerSay("Touch Event from " + (string)llDetectedLinkNumber(0)); } }
|
|
IBME Swindlehurst
Registered User
Join date: 5 Mar 2007
Posts: 139
|
THANK YOU all
04-03-2007 14:56
I see the error of my ways. It works just like you said. Thanks again!!!
|