Don't click here unless you want to be banned.

LSL Wiki : llAllowInventoryDrop

HomePage :: PageIndex :: RecentChanges :: RecentlyCommented :: UserSettings :: You are crawl814.us.archive.org
llAllowInventoryDrop(integer add)

If add is true, all users, even those who do not have modify permissions, can drop inventory items onto the object. If add is false the system forbids all users except those with modify permissions from dropping items onto the object.

The changed event handler is called with the CHANGED_ALLOWED_DROP flag when an item is dropped onto the object by a user that does not have modify permission. CHANGED_INVENTORY is passed to changed if someone with modify permission dropped the item.

To drop an inventory item onto/into an object, hold the Control key while dragging any inventory item onto the object (the object you're about to drop your item onto will be highlighted with a red frame). But for notecard drop, there is no need to hold the control key. Just drag and drop your notecard on which the object will be highlighted with a white frame.

Note: If you declare llAllowInventoryDrop in the root prim of a linkset and then drop a texture onto a child, it will go into the child's inventory, NOT the parents. This is odd, as every other object will go to the parent's inventory.

The exception are scripts, attempting to drop a script onto an object which allows inventory drops will cause the object to shout "Not permitted to edit this!".

default
{
    state_entry()
    {
        llAllowInventoryDrop(TRUE);
    }
    changed(integer mask)
    {
        if(mask & (CHANGED_ALLOWED_DROP | CHANGED_INVENTORY))
            llWhisper(0, "My inventory has changed");
    }
}


This article wasn't helpful for you? Maybe the related article at the LSL Portal is able to bring enlightenment.

Functions / Inventory
Comments [Hide comments/form]
A possible bug in 1.8... if the object is transparent the red frame will show up on the object behind it (if there is one) but the drop will work.
-- ArgentStonecutter (2006-01-30 19:44:03)
It would seem that this does not work with textures either, owner can drop them fine, but others just see the lock symbol. Intentional?
-- PeterNewell (2006-04-29 14:41:17)
Nevermind that, was a fault on the client side.
-- PeterNewell (2006-04-29 14:54:37)
I havent found a way to get the key of a person if they drop an item into inventory (For example, giving out a consolation gift if you donate a notecard to a suggestion box) Any Ideas?
-- KokiriSaarinen (2006-06-15 22:30:15)
have them touch the box first then enable llAllowInventoryDrop() then disable it again when it recieves the notecard via the changed event handler being triggered
-- BafiliusGoff (2006-07-08 10:38:09)
Hmm. Isn't this only a partial solution? What happens if two people are trying to drop things? And what happens if someone clicks and then walks away without dropping anything?
-- KimbeauSurveryor (2006-12-05 09:43:19)
kokiri, that is very easy.

string avatar;
default
{
touch_start()
{
avatar = llDetectedKey(0)
state state2;
}
}
state 2
{
state_entry()
{
llAllowInventoryDrop(TRUE);
}
changed(integer mask)
{
if(mask & (CHANGED_ALLOWED_DROP | CHANGED_INVENTORY))
llWhisper(0, "My inventory has changed");
}
}
you should know how to give a object to another player thru script.

And kimbeau,
ill reply sometime when i make something.... lol
-- Turnni1 (2007-01-13 07:07:19)
Attach a comment to this page: