Difference between revisions of "Osiris/Shared/DB GiveItemToEvent"

From Divinity Engine Wiki
Jump to: navigation, search
(DB_GiveItemToEvent)
 
m
 
(5 intermediate revisions by the same user not shown)
Line 4: Line 4:
 
Defining this database means that if the character/object flag '''_GiveItemToStoryEvent''' gets set on a character, one instance of the item '''_Item''' will be transferred to said character's inventory (regardless of where it is currently located).
 
Defining this database means that if the character/object flag '''_GiveItemToStoryEvent''' gets set on a character, one instance of the item '''_Item''' will be transferred to said character's inventory (regardless of where it is currently located).
 
===== Notes =====
 
===== Notes =====
* This is useful to transfer an item to a character (either a player or an NPC) in a dialog. Usually, you will want to check first whether the giver is in possession of the item. You can do so with the help of [[Osiris/Shared/DB_HasStoryvent|DB_HasStoryEvent]]. Note that you should perform the check and give action on the same dialog node, as otherwise the item could still be pick-pocketed in between the check and the transfer.
+
* This is useful to transfer an item to a character (either a player or an NPC) in a dialog. Usually, you will want to check first whether the giver is in possession of the item. You can do so with the help of [[Osiris/Shared/DB_HasStoryEvent|DB_HasStoryEvent]]. Note that you should perform the check and give action on the same dialog node, as otherwise the item could still be pick-pocketed in between the check and the transfer.
 
===== See Also =====
 
===== See Also =====
* [[Osiris/API/ItemIsInInventory|ItemToInventory]]
+
* [[Osiris/API/ItemToInventory|ItemToInventory]]
* Helper [[Osiris/Shared/DB_HasStoryvent|DB_HasStoryEvent]]
+
* Helper [[Osiris/Shared/DB_GiveNewItemFromTemplateEvent|DB_GiveNewItemFromTemplateEvent]]
 +
* Helper [[Osiris/Shared/DB_GiveTemplateFromNpcToPlayerDialogEvent|DB_GiveTemplateFromNpcToPlayerDialogEvent]]
 +
* Helper [[Osiris/Shared/DB_HasStoryEvent|DB_HasStoryEvent]]
 
   
 
   
[[Category:Osiris Shared Mod Helpers]]
+
[[Category:Osiris Shared Mod Helpers|GiveItemToEvent]]

Latest revision as of 12:22, 30 January 2018

Full Definition(s)
  • DB_GiveItemToEvent((ITEMGUID)_Item,(STRING)_GiveItemToStoryEvent)
Description

Defining this database means that if the character/object flag _GiveItemToStoryEvent gets set on a character, one instance of the item _Item will be transferred to said character's inventory (regardless of where it is currently located).

Notes
  • This is useful to transfer an item to a character (either a player or an NPC) in a dialog. Usually, you will want to check first whether the giver is in possession of the item. You can do so with the help of DB_HasStoryEvent. Note that you should perform the check and give action on the same dialog node, as otherwise the item could still be pick-pocketed in between the check and the transfer.
See Also