Difference between revisions of "Osiris/API/ItemMoved"
From Divinity Engine Wiki
(Documented ItemMoved) |
m |
||
(2 intermediate revisions by the same user not shown) | |||
Line 13: | Line 13: | ||
* This event does not get thrown when an item is moved from one inventory/container to another. Catch the [[Osiris/API/ItemMovedFromTo|ItemMovedFromTo]] to check such operations. | * This event does not get thrown when an item is moved from one inventory/container to another. Catch the [[Osiris/API/ItemMovedFromTo|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. | * 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 | + | * These event will only be thrown at the end of a movement operation. Because item movements [[Osiris/API/ItemMoveToPosition|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. |
+ | |||
===== See Also ===== | ===== See Also ===== | ||
* [[Osiris/API/ItemMovedFromTo|ItemMovedFromTo]] | * [[Osiris/API/ItemMovedFromTo|ItemMovedFromTo]] | ||
Line 20: | Line 21: | ||
* [[Osiris/API/ItemMoveToPosition|ItemMoveToPosition]] | * [[Osiris/API/ItemMoveToPosition|ItemMoveToPosition]] | ||
* [[Osiris/API/ItemScatterAt|ItemScatterAt]] | * [[Osiris/API/ItemScatterAt|ItemScatterAt]] | ||
+ | * [[Osiris/API/ItemTemplateMoved|ItemTemplateMoved]] | ||
* [[Osiris/API/ItemToTransform|ItemToTransform]] | * [[Osiris/API/ItemToTransform|ItemToTransform]] | ||
* [[Osiris/API/TeleportTo|TeleportTo]] | * [[Osiris/API/TeleportTo|TeleportTo]] |
Latest revision as of 10:46, 19 August 2018
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.