Difference between revisions of "Osiris/Shared/ProcCharacterMoveTo"
From Divinity Engine Wiki
m |
(Document QueryOnlyOnce) |
||
Line 1: | Line 1: | ||
===== Full Definition(s) ===== | ===== Full Definition(s) ===== | ||
− | * | + | * query '''QueryOnlyOnce'''(''(STRING)'''''_OnlyOnceUUID''') |
===== Description ===== | ===== Description ===== | ||
− | + | Helper to ensure a rule gets executed only once. | |
− | |||
− | |||
− | |||
− | |||
===== Return Values ===== | ===== Return Values ===== | ||
− | * / | + | * '''Success/Failure''': Fails if '''QueryOnlyOnce''' was previously called with '''_OnlyOnceUUID''' as parameter, otherwise succeeds. |
===== Notes ===== | ===== 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 ===== | ===== See Also ===== | ||
− | + | / | |
− | + | ||
− | + | [[Category:Osiris Queries]] | |
− | [[Category:Osiris |
Revision as of 19:58, 12 October 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
/