Osiris/API/ItemMoved
From Divinity Engine Wiki
Full Definition(s)
- event ItemMoved((ITEMGUID)_Item)
Description
Thrown whenever an item has moved for one of the following reasons:
- It was scattered by story, because it was in a container that was destroyed, or when a character died that was not lootable but that should nevertheless drop its loot (and hence its inventory gets scattered around its body).
- It was picked up by story, behaviour script, or a player.
- It was dropped by story, behaviour script, or a player.
- It was moved by story (ItemMoveToTrigger, ItemDragToPosition, ...), behaviour script, or a player.
- It was teleported by story (TeleportTo, TeleportToPosition), behaviour script, or a player.
Parameters
- _Item: The item that moved.
Notes
- This event does not get thrown when an item is moved from one inventory/container to another. Catch the ItemMovedFromTo to check such operations.
- Even if a story or behaviour script movement operation does not actually cause the item to move (because it was moved to its current position), this event will still be thrown.
- These event will only be thrown at the end of a movement operation. Because item movements are not queued and instead new movement operations will replace old ones, you will receive only one ItemMoved event if you start an item movement operation (any from the list above) while a previous one was still ongoing.