Aaron Levy
Medicated Lately?
Join date: 3 Jun 2004
Posts: 2,147
|
07-11-2004 21:20
I thought I had it figured out, but I changed something in the script I had that was working, and now I can't get it to work again.
I even copied and pasted the sample linkmessage in the Wiki, verbatim into to prims and linked them. Nothing happens. The receiver does not say what the sender sent to it.
I have 5 card prims, and I want to send a message from my main script to each card to tell it when to display it's card.
the card link numbers are 3,4,5,6, and 7, and the main script is located in link number 0. The main prim needs to communicate with each card prim, telling it a two-digit code. Using that two digit code, the card prim will know which card texture to use. (I already know how to do that, I need help with the llinked message stuff).
|
Christopher Omega
Oxymoron
Join date: 28 Mar 2003
Posts: 1,828
|
07-11-2004 21:47
The main script is located in link number 0? Are you sure about this? If the main script is in link number 0, then its not linked to anything else. The parent of a linked set has link number 1, children have linknumbers 2 to 255. If you are getting 0 as a result from llGetLinkNumber, your object isnt linked.
|
Aaron Levy
Medicated Lately?
Join date: 3 Jun 2004
Posts: 2,147
|
07-11-2004 22:20
My bad. I missed linking it that last time.
The link numbers for the cards are 4,5,6,7 and 8 The main prim is 3
But even when using a 2-prim object, I can no longer get the sample from the wiki to work. When I click on the sender object, the receiver remains silent.
|
Moopf Murray
Moopfmerising
Join date: 7 Jan 2004
Posts: 2,448
|
07-12-2004 01:34
From: someone Originally posted by Aaron Levy My bad. I missed linking it that last time.
The link numbers for the cards are 4,5,6,7 and 8 The main prim is 3
But even when using a 2-prim object, I can no longer get the sample from the wiki to work. When I click on the sender object, the receiver remains silent. Can you post the code you're using please. I get the feeling this is going to be a link number issue but seeing the code would help a little (won't help if your object in linked in an order that is not correct for your script though!)
|
Aaron Levy
Medicated Lately?
Join date: 3 Jun 2004
Posts: 2,147
|
07-12-2004 02:50
If I can get the sample code from the Wiki working, I think I can get it to work in my obejcts... I'm using a pure cut and paste from the Wiki... http://www.badgeometry.com/wiki/ExampleLinkMessage The sender script I'm pasting into one prim and the receiver script I'm pasting into another prim... I'm linking the two together (I've tried linking them in both orders possible). When I click on the sender, nothing happens. The receiver does not say the string the sender is supposed to be sending it.
|
Moopf Murray
Moopfmerising
Join date: 7 Jan 2004
Posts: 2,448
|
07-12-2004 03:02
That script is the Wiki is designed to be used to send link messages between scripts in the same prim, not in different prims. In the first script on that page you have: llMessageLinked(llGetLinkNumber(), 0, "Touched.", ""  ; llGetLinkNumber() gets the link number of the prim that the script is in, so basically it's sending a link message to the same prim (which is where you would put the second script on that page as well). So, what you need to do is remove llGetLinkNumber() and use the actual link number of the prim you want to send the message to, e.g. to send the message to prim 2: llMessageLinked(2, 0, "Touched.", ""  ; What may help you is to put a quick script in each prim that outputs the link number when touched, something like this: default { touch_start(integer total_number) { llWhisper(0,(stirng)llGetLinkNumber()); } }
When you touch the prim it will whisper its link number so you'll know what to use in the llMessageLinked command. It can be useful to do this just to make sure of the link numbers 
|
Aaron Levy
Medicated Lately?
Join date: 3 Jun 2004
Posts: 2,147
|
07-12-2004 03:25
Got it!! 
|
Catherine Omega
Geometry Ninja
Join date: 10 Jan 2003
Posts: 2,053
|
07-12-2004 10:19
I updated it to attempt to be a little more clear. Sorry about that.
|