Osiris/Shared/DB HasItemTemplateScriptFlag
From Divinity Engine Wiki
Full Definition(s)
- DB_HasItemTemplateScriptFlag((INTEGER)_TemplateVarIndex, (STRING)_Dialog, (STRING)_ItemTemplate, (INTEGER)_SpeakerIndex);
- DB_HasItemTemplateScriptFlag((INTEGER)_TemplateVarIndex, (STRING)_Dialog, (STRING)_ItemTemplate, (INTEGER)_SpeakerIndex, (INTEGER)_Amount);
Description
This functionality can be used in dialogs to check whether a participant has a certain number of items of a particular template in their inventory:
- _TemplateVarIndex: can be 1 - 5 at this time. Determines which which of the GEN_CheckHasItemTemplate/_2/_3/... script flags you can use to check whether a dialog participant (see _SpeakerIndex) has items of the specified item template in their inventory.
- _Dialog: the name of the dialog that this DB should influence.
- _ItemTemplate: the item template to check for. Format: name_UUID (no ITEMGUID_ prefix!)
- _SpeakerIndex: This sets the speaker dialog variable used by GEN_CheckHasItemTemplate/.. and hence must refer to a speaker index in the dialog. It determines which speaker will be checked for having a sufficient number of items of the specified template.
- _Amount: the number of items to check for. If unspecified, defaults to 1.
Notes
- Unlike DB_HasTemplateItem, this works for both players and NPCs.
- This functionality is not yet available in currently released versions of the game.