I have a linked object. One of the objects is supposed to allow a notecard to be dropped on it, but because it is not the root prim, the notecard when dropped goes to the root prim inventory. OK, I dug around the forum and thought I found a solution, use llGiveInventory when a change event (INVENTORY_NOTECARD) is triggered and send that notecard to the prim with the script to read it. I wrote the script and it works, BUT....
because it's a linked object (I guess) as soon as the child prim receives the notecard the script in the root prim with the Changed event fires and I'm in an infinite loop with the root prim giving the notecard to the child prim, creating a changed event in the root prim, and on and on. Here is the script I wrote, maybe there is something wrong with that or maybe someone has another solution (other having the root prim read the notecard, which I just thought of, but I'd rather keep that function separate in the child prim, accessible by Touch).
changed (integer change) {
if (change & CHANGED_INVENTORY) {
integer numbernotes = llGetInventoryNumber(INVENTORY_NOTECARD);
llGiveInventory("e7a2656f-30c6-5b66-dd69-fa1c9c0c10bb", llGetInventoryName(INVENTORY_NOTECARD, numbernotes - 1));
llWhisper(0, "Sending notecard for processing"
;}
}
Now that I look at this perhaps there is something I can do with the change integer in my if statement.... hmmmm
Thanks for any help you might be able to shed on this problem
Robins Hermano
