Difference between revisions of "Osiris/Shared/DB HasTemplateItem"
From Divinity Engine Wiki
m |
m |
||
(One intermediate revision by the same user not shown) | |||
Line 4: | Line 4: | ||
Defining this database will result in the character/object flag '''_flag''' to be set on a character as long as it has at least one item with the root template '''_template''' in its inventory. | Defining this database will result in the character/object flag '''_flag''' to be set on a character as long as it has at least one item with the root template '''_template''' in its inventory. | ||
===== Notes ===== | ===== Notes ===== | ||
+ | * This database only works for players, and not for NPCs. | ||
* See the notes of [[Osiris/Shared/DB_HasStoryEvent|DB_HasStoryEvent]] for usage tips. | * See the notes of [[Osiris/Shared/DB_HasStoryEvent|DB_HasStoryEvent]] for usage tips. | ||
+ | * See the notes for [[Osiris/API/ItemAddedToCharacter|ItemAddedToCharacter]] for an important caveat. | ||
===== See Also ===== | ===== See Also ===== | ||
* [[Osiris/API/CharacterGetItemTemplateCount|CharacterGetItemTemplateCount]] | * [[Osiris/API/CharacterGetItemTemplateCount|CharacterGetItemTemplateCount]] | ||
+ | * [[Osiris/API/ItemAddedToCharacter|ItemAddedToCharacter]] | ||
* [[Osiris/API/ItemTemplateIsInCharacterInventory|ItemTemplateIsInCharacterInventory]] | * [[Osiris/API/ItemTemplateIsInCharacterInventory|ItemTemplateIsInCharacterInventory]] | ||
+ | * [[Osiris/API/ItemTemplateIsInUserInventory|ItemTemplateIsInUserInventory]] | ||
* [[Osiris/API/ItemIsInInventory|ItemIsInInventory]] | * [[Osiris/API/ItemIsInInventory|ItemIsInInventory]] | ||
* Helper [[Osiris/Shared/DB_HasStoryEvent|DB_HasStoryEvent]] | * Helper [[Osiris/Shared/DB_HasStoryEvent|DB_HasStoryEvent]] |
Latest revision as of 11:44, 14 February 2018
Full Definition(s)
- DB_HasTemplateItem((STRING)_template, (STRING)_flag)
Description
Defining this database will result in the character/object flag _flag to be set on a character as long as it has at least one item with the root template _template in its inventory.
Notes
- This database only works for players, and not for NPCs.
- See the notes of DB_HasStoryEvent for usage tips.
- See the notes for ItemAddedToCharacter for an important caveat.