Osiris/Shared/QueryOnlyOnce

From Divinity Engine Wiki
Jump to: navigation, search
Full Definition(s)
  • query QueryOnlyOnce((STRING)_OnlyOnceUUID)
Description

Helper to ensure a rule gets executed only once.

Return Values
  • Success/Failure: Fails if QueryOnlyOnce was previously called with _OnlyOnceUUID as parameter, otherwise succeeds.
Notes
  • This query defines DB_OnlyOnce(_OnlyOnceUUID), so you can test that afterwards to determine whether this query has been executed already.
Example
IF
GameStarted("TUT_Tutorial_A",_)
AND
QueryOnlyOnce("FTJ_IfanStoryInit_TUT")
THEN
ItemToInventory(ITEMGUID_S_FTJ_IfanNoteFromDarkFaction_51899f0f-6ea2-4522-893b-69ccd87b97fb,CHARACTERGUID_S_Player_Ifan_ad9a3327-4456-42a7-9bf4-7ad60cc9e54f,-1,0);
See Also