Difference between revisions of "Osiris/Shared/ProcCharacterMoveTo"

From Divinity Engine Wiki
Jump to: navigation, search
(Document QueryOnlyOnce)
m
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
===== Full Definition(s) =====
 
===== Full Definition(s) =====
* query '''QueryOnlyOnce'''(''(STRING)'''''_OnlyOnceUUID''')
+
* PROC '''ProcCharacterMoveTo'''(''(CHARACTERGUID)'''''_Char''', ''(GUIDSTRING)'''''_Point''', ''(INTEGER)'''''_Running''', ''(STRING)'''''_Event''')
 
===== Description =====
 
===== Description =====
Helper to ensure a rule gets executed only once.
+
This is a wrapper around the [[Osiris/API/CharacterMoveTo|CharacterMoveTo]] API call that takes care of interactions with various other behaviours. A.o.,
 +
* It disables all dialogs while the character is moving.
 +
* It disables all reactions to crimes while the character is moving.
 +
* If the move is interrupted in one way or another, the character will resume moving after the interruption
 
===== 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.
+
* If you wish to abort a move initiated this way, in addition to calling [[Osiris/API/CharacterPurgeQueue|CharacterPurgeQueue]], you also have to call [[Osiris/Shared/ProcClearStoryMove|ProcClearStoryMove]]. This will restore all of the suspended behaviours and prevent the resumption of the movement at a later moment.
===== Example =====
+
* Preferably always use this routine or [[Osiris/Shared/ProcStateManagerCharacterMoveTo|ProcStateManagerCharacterMoveTo]] instead of [[Osiris/API/CharacterMoveTo|CharacterMoveTo]].
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 =====
/
+
* [[Osiris/API/CharacterMoveTo|CharacterMoveTo]]
 
+
* Helper [[Osiris/Shared/ProcClearStoryMove|ProcClearStoryMove]]
[[Category:Osiris Queries]]
+
* Helper [[Osiris/Shared/ProcStateManagerCharacterMoveTo|ProcStateManagerCharacterMoveTo]]
 +
 +
[[Category:Osiris Shared Mod Helpers|CharacterMoveTo]]

Latest revision as of 14:42, 21 February 2018

Full Definition(s)
  • PROC ProcCharacterMoveTo((CHARACTERGUID)_Char, (GUIDSTRING)_Point, (INTEGER)_Running, (STRING)_Event)
Description

This is a wrapper around the CharacterMoveTo API call that takes care of interactions with various other behaviours. A.o.,

  • It disables all dialogs while the character is moving.
  • It disables all reactions to crimes while the character is moving.
  • If the move is interrupted in one way or another, the character will resume moving after the interruption
Return Values
  • /
Notes
See Also