Difference between revisions of "LlAllowInventoryDrop"

From Second Life Wiki
Jump to navigation Jump to search
(caveat to bug (after lots of testing with eddy inworld ^^))
(The string I edited was running off the page.)
Line 86: Line 86:
         if (change & CHANGED_ALLOWED_DROP) //note that it's & and not &&... it's bitwise!
         if (change & CHANGED_ALLOWED_DROP) //note that it's & and not &&... it's bitwise!
         {
         {
             llOwnerSay("The inventory has changed as a result of a user without mod permissions dropping an item on the prim and it being allowed by the script.");
             llOwnerSay("The inventory has changed as a result of a user without mod permissions dropping  
                        an item on the prim and it being allowed by the script.");
         }
         }
     }
     }

Revision as of 00:15, 8 August 2009

Summary

Function: llAllowInventoryDrop( integer add );

Allows for all users without modify permissions to add inventory items to a prim.

• integer add boolean, If TRUE allows anyone to drop inventory on prim, FALSE revokes.

To actually do the dropping, you need to drag an item from your inventory and drop it onto the prim WHILE holding down your Ctrl key. If you've got everything right, then just before you release it, you will see the prim framed in red.

Ownership of the dropped inventory item changes to the owner of the prim. Next owner permissions kick in on the item that was dropped in. Non-transfer items cannot be dropped into a prim owned by someone else.

Caveats

  • Scripts are an exception to what is allowed to be dropped in. If a user without modify permissions to a prim attempts to drop a script into it, the inventory addition is rejected and the prim shouts (sic -- shouts, not says) "Not permitted to edit this!" This is for obvious security reasons. If you own the prim and have mod rights to it, you can drop a script in. Friends who have mod rights to your stuff can also drop scripts in.
  • Will not work if, under the Object tab on the prim, "Locked" is ticked.
  • Bear in mind when dropping a texture into a prim to be sure (a) that you see a red box framing the target prim, and (b) not to release the Ctrl button until you are sure that the texture is actually inside the box. If you see a white frame instead, or release Ctrl too soon, the texture will instead be applied to the prim face that you were on.
  • There is no way to tell who dropped the item in. If you really need to know, consider making the user touch the prim first to turn the llAllowInventoryDrop on, and then grab the user's information from the touch event, and then set it back to FALSE through a timer.
  • Nor is there any way based on just llAllowInventoryDrop to tell *what* the user dropped in. Again, see WhoAddedWhat script to handle that.
  • Ordinary end-users may face challenges when confronted with actually performing the drag and drop. See "llAllowInventoryDrop and Everyday Users" section below.

Important Issues

~ All Issues ~ Search JIRA for related Bugs
   Not possible to drop inventory into objects which are using an full alpha texture (when highlight transparent is disabled)

Examples

WHEN llAllowInventoryDrop IS SET TO TRUE.....
.... Allows anyone, even if they don't have modify rights to a prim, regardless of whether they are the owner or not, to drop items into that prim.

An application might be a public "suggestion box" that you want to let people drop notecards into.

When llAllowInventoryDrop is set to TRUE, the event that occurs is:

<lsl>

changed(integer change) {
       if (change & CHANGED_ALLOWED_DROP) { 

llSay(0, "Your contribution is appreciated, o ye non-permitted modifier!");

       }
   }

</lsl>


WHEN llAllowInventoryDrop IS SET TO FALSE.....
.... Inventory dropping can still be done, but it is restricted only to people with modify permissions to that prim. Note that people with modify rights to your (modifiable) stuff can do this anyway, as can you, even without the presence of llAllowInventoryDrop. Note as well that even if you own the prim, but don't have modify rights to it, you cannot drop anything at all into it, ever, unless the creator put in it an llAllowInventoryDrop(TRUE) first before passing it to you.

(Note as well that if you have a prim that you don't have mod rights to, but that the creator did set an llAllowInventoryDrop(TRUE) in, that even though you can drop stuff in, you will never be able to extract it! You can't even delete the stuff out of it! )

When llAllowInventoryDrop is set to FALSE, the event that occurs is:

<lsl>

changed(integer change) {
       if (change & CHANGED_INVENTORY) { 

llSay(0, "Your contribution is appreciated, o ye permitted modifier!");

       }
   }

</lsl>

Tip! To test for either changed event, the proper syntax is:

<lsl> changed(integer change) {

if ((change & (CHANGED_ALLOWED_DROP

See Also

Events

•  changed CHANGED_ALLOWED_DROP

Deep Notes

All Issues

~ Search JIRA for related Issues
   Not possible to drop inventory into objects which are using an full alpha texture (when highlight transparent is disabled)

Signature

function void llAllowInventoryDrop( integer add );