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

From Divinity Engine Wiki
Jump to: navigation, search
(DB_GiveTemplateFromNpcToPlayerDialogEvent documentation)
 
m
 
(2 intermediate revisions by the same user not shown)
Line 4: Line 4:
 
Defining this database means that if the character/object flag '''_event''' gets set on an NPC while it is in a dialog, this NPC will attempt to transfer one instance of an item with the root template '''_template''' to the [[Osiris/Shared/DB_DialogPlayers|first player]] in that dialog. If it succeeds (= if the NPC had such an item in its inventory), the flag '''_success''' will be set on that NPC. Otherwise nothing happens.
 
Defining this database means that if the character/object flag '''_event''' gets set on an NPC while it is in a dialog, this NPC will attempt to transfer one instance of an item with the root template '''_template''' to the [[Osiris/Shared/DB_DialogPlayers|first player]] in that dialog. If it succeeds (= if the NPC had such an item in its inventory), the flag '''_success''' will be set on that NPC. Otherwise nothing happens.
 
===== Notes =====
 
===== Notes =====
/
+
* See [[Osiris/Shared/DB_GiveTemplateFromPlayerDialogEvent|DB_GiveTemplateFromPlayerDialogEvent]] for an example and a warning about frame delays.
 
===== See Also =====
 
===== See Also =====
 
* [[Osiris/API/ItemTemplateAddTo|ItemTemplateAddTo]]
 
* [[Osiris/API/ItemTemplateAddTo|ItemTemplateAddTo]]
 
* [[Osiris/API/ItemTemplateRemoveFrom|ItemTemplateRemoveFrom]]
 
* [[Osiris/API/ItemTemplateRemoveFrom|ItemTemplateRemoveFrom]]
 +
* Helper [[Osiris/Shared/DB_GiveNewItemFromTemplateEvent|DB_GiveNewItemFromTemplateEvent]]
 +
* Helper [[Osiris/Shared/DB_GiveTemplateFromPlayerDialogEvent|DB_GiveTemplateFromPlayerDialogEvent]]
 
* Helper [[Osiris/Shared/DB_HasTemplateItem|DB_HasTemplateItem]]
 
* Helper [[Osiris/Shared/DB_HasTemplateItem|DB_HasTemplateItem]]
* Helper [[Osiris/Shared/DB_GiveNewItemFromTemplateEvent|DB_GiveNewItemFromTemplateEvent]]
+
 
+
[[Category:Osiris Shared Mod Helpers|GiveTemplateFromNpcToPlayerDialogEvent]]
[[Category:Osiris Shared Mod Helpers]]
 

Latest revision as of 16:50, 19 December 2017

Full Definition(s)
  • DB_GiveTemplateFromNpcToPlayerDialogEvent((STRING)_template, (STRING)_event, (STRING)_success,)
Description

Defining this database means that if the character/object flag _event gets set on an NPC while it is in a dialog, this NPC will attempt to transfer one instance of an item with the root template _template to the first player in that dialog. If it succeeds (= if the NPC had such an item in its inventory), the flag _success will be set on that NPC. Otherwise nothing happens.

Notes
See Also