Difference between revisions of "Osiris/API/ItemToInventory"
From Divinity Engine Wiki
m (link ItemTemplateAddTo) |
m |
||
(4 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
===== Full Definition(s) ===== | ===== Full Definition(s) ===== | ||
− | * call '''ItemToInventory'''(''(ITEMGUID)'''''_Item''',''(GUIDSTRING)'''''_TargetObject''',''(INTEGER)'''''_Amount''') | + | * (Shared mod) call '''ItemToInventory'''(''(ITEMGUID)'''''_Item''', ''(GUIDSTRING)'''''_TargetObject''', ''(INTEGER)'''''_Amount''') |
+ | * call '''ItemToInventory'''(''(ITEMGUID)'''''_Item''', ''(GUIDSTRING)'''''_TargetObject''', ''(INTEGER)'''''_Amount''', ''(INTEGER)'''''_ClearOriginalOwner''') | ||
===== Description ===== | ===== Description ===== | ||
− | Transfers '''_Amount''' instances of '''_Item''' to '''_TargetObject'''. '''_TargetObject''' can either be a character or a container object. This item, or stack of items, must already exist in the game world. You cannot specify a root template as '''_Item'''. | + | Transfers '''_Amount''' instances of '''_Item''' to '''_TargetObject'''. '''_TargetObject''' can either be a character or a container object. This item, or stack of items, must already exist in the game world. You cannot specify a root template as '''_Item''' (use [[Osiris/API/ItemTemplateAddTo|ItemTemplateAddTo]] instead in that case). |
+ | |||
+ | ''(New parameter in DOS2 Patch 5)'' If '''_ClearOriginalOwner''' is '''1''', then the original owner of the item will be reset and hence the item will never be considered to be stolen. If it is '''0''', then the original owner (if any) will remain set. | ||
===== Notes ===== | ===== Notes ===== | ||
* / | * / | ||
===== See Also ===== | ===== See Also ===== | ||
+ | * [[Osiris/API/ItemAddedToCharacter|ItemAddedToCharacter]] | ||
+ | * [[Osiris/API/ItemClearOwner|ItemClearOwner]] | ||
+ | * [[Osiris/API/ItemGetOwner|ItemGetOwner]] | ||
+ | * [[Osiris/API/ItemGetOriginalOwner|ItemGetOriginalOwner]] | ||
+ | * [[Osiris/API/ItemSetOwner|ItemSetOwner]] | ||
* [[Osiris/API/ItemTemplateAddTo|ItemTemplateAddTo]] | * [[Osiris/API/ItemTemplateAddTo|ItemTemplateAddTo]] | ||
+ | * [[Osiris/API/ItemToTransform|ItemToTransform]] | ||
+ | * [[Osiris/API/MoveAllItemsTo|MoveAllItemsTo]] | ||
* Helper [[Osiris/Shared/DB_GiveItemToEvent|DB_GiveItemToEvent]] | * Helper [[Osiris/Shared/DB_GiveItemToEvent|DB_GiveItemToEvent]] | ||
− | [[Category:Osiris Calls]] | + | [[Category:Osiris Calls|ItemToInventory]] |
Latest revision as of 08:21, 11 March 2019
Full Definition(s)
- (Shared mod) call ItemToInventory((ITEMGUID)_Item, (GUIDSTRING)_TargetObject, (INTEGER)_Amount)
- call ItemToInventory((ITEMGUID)_Item, (GUIDSTRING)_TargetObject, (INTEGER)_Amount, (INTEGER)_ClearOriginalOwner)
Description
Transfers _Amount instances of _Item to _TargetObject. _TargetObject can either be a character or a container object. This item, or stack of items, must already exist in the game world. You cannot specify a root template as _Item (use ItemTemplateAddTo instead in that case).
(New parameter in DOS2 Patch 5) If _ClearOriginalOwner is 1, then the original owner of the item will be reset and hence the item will never be considered to be stolen. If it is 0, then the original owner (if any) will remain set.
Notes
- /