Difference between revisions of "Osiris/Shared/QueryOnlyOnce"
From Divinity Engine Wiki
(Document QueryOnlyOnce) |
m |
||
Line 17: | Line 17: | ||
/ | / | ||
− | [[Category:Osiris Shared Mod Helpers]] | + | [[Category:Osiris Shared Mod Helpers|QueryOnlyOnce]] |
Revision as of 16:02, 19 December 2017
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
/