Difference between revisions of "Osiris/Shared/QueryOnlyOnce"

From Divinity Engine Wiki
Jump to: navigation, search
(Document QueryOnlyOnce)
 
m
 
(One intermediate revision by the same user not shown)
Line 15: Line 15:
 
  ItemToInventory(ITEMGUID_S_FTJ_IfanNoteFromDarkFaction_51899f0f-6ea2-4522-893b-69ccd87b97fb,CHARACTERGUID_S_Player_Ifan_ad9a3327-4456-42a7-9bf4-7ad60cc9e54f,-1,0);
 
  ItemToInventory(ITEMGUID_S_FTJ_IfanNoteFromDarkFaction_51899f0f-6ea2-4522-893b-69ccd87b97fb,CHARACTERGUID_S_Player_Ifan_ad9a3327-4456-42a7-9bf4-7ad60cc9e54f,-1,0);
 
===== See Also =====
 
===== See Also =====
/
+
* [[Osiris/Shared/DB_Singleton|DB_Singleton]]
 
    
 
    
[[Category:Osiris Shared Mod Helpers]]
+
[[Category:Osiris Shared Mod Helpers|QueryOnlyOnce]]

Latest revision as of 22:49, 7 February 2018

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