Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

llAllowInventoryDrop issues...

Sydney Alexander
Registered User
Join date: 19 Feb 2005
Posts: 69
02-24-2006 19:07
Kenn Nilsson helped me out with this a few months ago and I am just gtting back to it. My issue is with the "reminder" I have put in place. I am sending a linked message to another script to do somehting whenever this object is touched or the command is spoken. Then once I drop an item on the object using llAllowInventoryDrop I want another linked message sent to stop the script form doing something. Right no I can have the notecard given to me, the llOwnerSay works, but the linked message does not seem to be working? Any thoughts?

thanks,


CODE



integer channel=46;
integer handle;

default
{
state_entry()
{
llListenRemove(handle);
llAllowInventoryDrop(TRUE);
handle = llListen(channel, "", llGetOwner(), "");
}
on_rez(integer params)
{
llListenRemove(handle);
handle = llListen(channel, "", llGetOwner(), "");
llOwnerSay("TEST");

}

changed(integer change)
{
//if(change & CHANGED_INVENTORY)
if(change & (CHANGED_ALLOWED_DROP | CHANGED_INVENTORY))
llOwnerSay("GOT IT");
llMessageLinked(LINK_THIS, 0, "stop", NULL_KEY);
{
if(llGetInventoryNumber(INVENTORY_NOTECARD) >= 10)
{
string _delete = llGetInventoryName(INVENTORY_NOTECARD, 0);
llRemoveInventory(_delete);
}
}
}

touch_start(integer total_number)
{
if(llDetectedKey(0) == llGetOwner())
{
string _give = llGetInventoryName(INVENTORY_NOTECARD, (llGetInventoryNumber(INVENTORY_NOTECARD) - 1));
llGiveInventory(llDetectedKey(0),_give);
llMessageLinked(LINK_THIS, 0, "START", NULL_KEY);
llOwnerSay("START");
}
}

listen(integer channel, string name, key id, string message)
{
message = llToLower(message);

if(message == "new")
{
string _give = llGetInventoryName(INVENTORY_NOTECARD, (llGetInventoryNumber(INVENTORY_NOTECARD) - 1));
llGiveInventory(id,_give);
llMessageLinked(LINK_THIS, 0, "START", NULL_KEY);
llOwnerSay("START");
}
}
}
Nathan Stewart
Registered User
Join date: 2 Feb 2005
Posts: 1,039
02-25-2006 05:47
From: Sydney Alexander
Kenn Nilsson helped me out with this a few months ago and I am just gtting back to it. My issue is with the "reminder" I have put in place. I am sending a linked message to another script to do somehting whenever this object is touched or the command is spoken. Then once I drop an item on the object using llAllowInventoryDrop I want another linked message sent to stop the script form doing something. Right no I can have the notecard given to me, the llOwnerSay works, but the linked message does not seem to be working? Any thoughts?

thanks,


Is the recieving prims looking for the message "stop" or "STOP", stick an ownersay in the linked prim to see if its recieveing the message.
_____________________
Sydney Alexander
Registered User
Join date: 19 Feb 2005
Posts: 69
02-25-2006 06:29
Hi Nathan -

I have double checked both as you suggest and it is "stop" and everything but the "on item drop" does what it should do. I have made some adjustments below and still have no luck... :confused:

When I click the object I am given a notecard, an llOwnerSay fires and the llMessageLinked tells a second script to start...

When I drop an item on the object I want the llOwnerSay to fire again and the llMessageLinked to tell that second script to stop. I have the first part working it is this part that is DOA

there is also a bit (thanks Kenn) that does not allow the inventory to grow past 10. I think it has to do with this section below...

CODE

changed(integer mask)
{
//if(change & CHANGED_INVENTORY)
if(mask & (CHANGED_ALLOWED_DROP | CHANGED_INVENTORY))
llOwnerSay("Your notecard has been saved.");
llMessageLinked(LINK_THIS, 0, "stop", NULL_KEY);
}
changed(integer change)
{
if(change & CHANGED_INVENTORY)
{
if(llGetInventoryNumber(INVENTORY_NOTECARD) >= 10)
{
string _delete = llGetInventoryName(INVENTORY_NOTECARD, 0);
llRemoveInventory(_delete);
}
}
}


***I just flipped the section above and now everything works with the llOwnerSay, but neither llMessageLinked works with the script in this order...

From: Nathan Stewart
Is the recieving prims looking for the message "stop" or "STOP", stick an ownersay in the linked prim to see if its recieveing the message.
Seagel Neville
Far East User
Join date: 2 Jan 2005
Posts: 1,476
02-28-2006 05:01
Anyway, I don't think that two changed events can work.
Then, speaking of llMessageLinked issue, is there any problem with the script that you didn't show?
_____________________
:) Seagel Neville :)
Sydney Alexander
Registered User
Join date: 19 Feb 2005
Posts: 69
02-28-2006 07:53
I think that is my problem.. the two "change events"... The rest of the script works fine, it is very "simple" in what it does... so I thought. :p

From: Seagel Neville
Anyway, I don't think that two changed events can work.
Then, speaking of llMessageLinked issue, is there any problem with the script that you didn't show?