Difference between revisions of "CHANGED INVENTORY"

From Second Life Wiki
Jump to navigation Jump to search
(added details for CHANGED_INVENTORY)
 
(6 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{{LSL Constant
{{Issues/SVC-304}}{{LSL Constant
|name=CHANGED_INVENTORY
|name=CHANGED_INVENTORY
|type=integer
|type=integer
|value={{LSL Hex|0x1}}
|value={{LSL Hex|0x1}}
|desc=Prim inventory has [[changed]] by someone who has modification rights to a prim. Inventory changes that cause this event are: inventory item is added or deleted, inventory item name is changed, inventory item permissions are changed, a script in inventory is recompiled, or a notecard in inventory is saved. This event does not occur when: a no-copy inventory item is moved to user inventory, a script in inventory is reset, or when a user without modification rights drops an object into a prim's inventory due to [[llAllowInventoryDrop]].
|desc=Prim inventory has [[changed]] by someone who has modification rights to a prim.
 
'''Inventory changes that cause this event are:'''
*Inventory item is added or deleted
*Inventory item name is changed
*Inventory item permissions are changed
*A different script in inventory is recompiled
*A notecard in inventory is saved
'''This event does not occur when:'''
*A no-copy inventory item is moved to user inventory
*A script in inventory is reset
*A user without modification rights drops an object into a prim's inventory due to [[llAllowInventoryDrop]].
**In this situation the [[CHANGED_ALLOWED_DROP]] flag is set instead of [[CHANGED_INVENTORY]].
*An object that was rezzed from inventory is saved back to object contents
 
'''Important''' : This event is triggered in the root prim by a change in any child prim, unless the child prim has a handler for it. It is not triggered in any other linked prim.
|examples=
|examples=
<pre>
<source lang="lsl2">
default
default
{
{
Line 16: Line 31:
     }
     }
}
}
</pre>
</source>
|constants=
|constants=
{{LSL DefineRow||[[CHANGED_ALLOWED_DROP]]|[[llAllowInventoryDrop]]}}
{{LSL DefineRow||[[CHANGED_ALLOWED_DROP]]|[[llAllowInventoryDrop]]}}

Latest revision as of 10:41, 21 November 2016

Description

Constant: integer CHANGED_INVENTORY = 0x1;

The integer constant CHANGED_INVENTORY has the value 0x1

Prim inventory has changed by someone who has modification rights to a prim.

Inventory changes that cause this event are:

  • Inventory item is added or deleted
  • Inventory item name is changed
  • Inventory item permissions are changed
  • A different script in inventory is recompiled
  • A notecard in inventory is saved

This event does not occur when:

  • A no-copy inventory item is moved to user inventory
  • A script in inventory is reset
  • A user without modification rights drops an object into a prim's inventory due to llAllowInventoryDrop.
  • An object that was rezzed from inventory is saved back to object contents

Important : This event is triggered in the root prim by a change in any child prim, unless the child prim has a handler for it. It is not triggered in any other linked prim.

Caveats


Related Articles

Constants

•  CHANGED_ALLOWED_DROP llAllowInventoryDrop

Functions

•  llGiveInventory
•  llRemoveInventory
•  llRemoteLoadScriptPin

Events

•  changed

Examples

default
{
    changed(integer change)
    {
        if (change & CHANGED_INVENTORY) //note that it's & and not &&... it's bitwise!
        {
            llOwnerSay("The inventory has changed.");
        }
    }
}

Deep Notes

All Issues

~ Search JIRA for related Issues
   CHANGED_INVENTORY not triggered by llRemoveInventory()

Signature

integer CHANGED_INVENTORY = 0x1;