Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

give link number on touch

Krazzora Zaftig
Do you have my marbles?
Join date: 20 Aug 2005
Posts: 649
12-22-2006 09:25
ok I think all this ho ho hoing is getting to me. Someone help. Trying to make a small script teo tell me what link number a prim is when I touch it in an object. Thanks in advance for the help.
_____________________
Ziggy Puff
Registered User
Join date: 15 Jul 2005
Posts: 1,143
12-22-2006 09:33
I think there's an llDetectedLinkNumber function. So maybe something like:

CODE

touch_start(integer num)
{
llOwnerSay((string)llDetectedLinkNumber(0));
}
Krazzora Zaftig
Do you have my marbles?
Join date: 20 Aug 2005
Posts: 649
12-22-2006 11:52
yeah I know the scripting is there..just my attempts had been failing and well I was getting tweaked fast cause of it being holidays.
_____________________
Janka Werribee
Scripter Wannabe
Join date: 28 Oct 2006
Posts: 64
12-22-2006 14:15
I think what you meant to say is "llGetLinkNumber", not "llDetectedLinkNumber"? The detected thingies refer to the one who did the touching, not to the one who is touched.
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
12-22-2006 14:24
From: Janka Werribee
I think what you meant to say is "llGetLinkNumber", not "llDetectedLinkNumber"? The detected thingies refer to the one who did the touching, not to the one who is touched.


No llDetectedLinkNumber is Correct in this instance.
It gives the link number of the prim that was touched where as llGetLinkNumber returns the link number of the prim the script is in.
Krazzora Zaftig
Do you have my marbles?
Join date: 20 Aug 2005
Posts: 649
12-22-2006 14:29
ok so in this case where would this script go...in the root and llGetLinkNumber would be if I put the script in the exact prim I wanted?
_____________________
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
12-22-2006 15:33
From: Krazzora Zaftig
ok so in this case where would this script go...in the root and llGetLinkNumber would be if I put the script in the exact prim I wanted?


Yes, you can put the script in the root prim and have it handle all the touching of child prims.

You would use llGetLink Number in your child prims if they needed to know their link number for some reason, i.e. to respond to specific linked messages maybe.