Difference between revisions of "Osiris/API/ItemToInventory"

From Divinity Engine Wiki
Jump to: navigation, search
m
(Documented change in patch 5)
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''' (use [[Osiris/API/ItemTemplateAddTo|ItemTemplateAddTo]] instead in that case).
 
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 =====
 
* /
 
* /

Revision as of 11:33, 8 December 2017

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
  • /
See Also