Difference between revisions of "Osiris/API/ItemTemplateMoved"
From Divinity Engine Wiki
m (Documented extra case in which this event does not get thrown.) |
m |
||
Line 8: | Line 8: | ||
===== Notes ===== | ===== Notes ===== | ||
* See [[Osiris/API/ItemMoved|ItemMoved]]. | * See [[Osiris/API/ItemMoved|ItemMoved]]. | ||
− | * This event does not get thrown if the item's ''CanBePickedUp'' and ''CanMove'' properties are both false. The [[Osiris/API/ItemMoved|ItemMoved]] will still be thrown in this case. | + | * This event does not get thrown if the item's ''CanBePickedUp'' and ''CanMove'' properties are both false. The [[Osiris/API/ItemMoved|ItemMoved]] event will still be thrown in this case. |
* There also a corner case in which the [[Osiris/API/ItemMoved|ItemMoved]] event gets thrown, but not this event: if code cannot find the root template of the moved item. This might happen if a root template was deleted of an item that already existed in a savegame. Doing so is [[Modding:_Versioning#First_golden_rule|not allowed]] though, so normally this should never happen. | * There also a corner case in which the [[Osiris/API/ItemMoved|ItemMoved]] event gets thrown, but not this event: if code cannot find the root template of the moved item. This might happen if a root template was deleted of an item that already existed in a savegame. Doing so is [[Modding:_Versioning#First_golden_rule|not allowed]] though, so normally this should never happen. | ||
===== See Also ===== | ===== See Also ===== |
Latest revision as of 15:59, 2 July 2018
Full Definition(s)
- event ItemTemplateMoved((STRING)_ItemTemplate, (ITEMGUID)_Item)
Description
Thrown under the same conditions as ItemMoved (with one caveat, see notes below), but additionally also provides the root template of the moved item.
Parameters
- _ItemTemplate: The root template of the moved item in the format TemplateName_UUID.
- _Item: The item that moved.
Notes
- See ItemMoved.
- This event does not get thrown if the item's CanBePickedUp and CanMove properties are both false. The ItemMoved event will still be thrown in this case.
- There also a corner case in which the ItemMoved event gets thrown, but not this event: if code cannot find the root template of the moved item. This might happen if a root template was deleted of an item that already existed in a savegame. Doing so is not allowed though, so normally this should never happen.