Difference between revisions of "Osiris/Shared/ProcGetClosestAvailableCharacterTo"

From Divinity Engine Wiki
Jump to: navigation, search
m
m (Reverted edits by Greever (talk) to last revision by Tinkerer)
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
===== Full Definition(s) =====
 
===== Full Definition(s) =====
* PROC '''ProcGetClosestAvailableCharacterTo'''(''(CHARACTERGUID)'''''_Obj''',''(INTEGER)'''''_SightCheck''')
+
* PROC '''ProcGetClosestAvailableCharacterTo'''(''(CHARACTERGUID)'''''_Obj''', ''(INTEGER)'''''_SightCheck''')
* PROC '''ProcGetClosestAvailableCharacterTo'''(''(CHARACTERGUID)'''''_Obj''',''(INTEGER)'''''_SightCheck''',''(INTEGER)'''''_PartyCheck''',''(CHARACTERGUID)'''''_Player''')
+
* PROC '''ProcGetClosestAvailableCharacterTo'''(''(CHARACTERGUID)'''''_Obj''', ''(INTEGER)'''''_SightCheck''', ''(INTEGER)'''''_PartyCheck''', ''(CHARACTERGUID)'''''_Player''')
* PROC '''ProcGetClosestAvailableCharacterTo'''(''(CHARACTERGUID)'''''_Obj''',''(INTEGER)'''''_SightCheck''',''(INTEGER)'''''_PartyCheck''',''(CHARACTERGUID)'''''_Player''',''(CHARACTERGUID)'''''_ExceptPlayer''')
+
* PROC '''ProcGetClosestAvailableCharacterTo'''(''(CHARACTERGUID)'''''_Obj''', ''(INTEGER)'''''_SightCheck''', ''(INTEGER)'''''_PartyCheck''', ''(CHARACTERGUID)'''''_Player''', ''(CHARACTERGUID)'''''_ExceptPlayer''')
  
 
===== Description =====
 
===== Description =====
Line 21: Line 21:
 
* [[Osiris/API/GetClosestAlivePlayer|GetClosestAlivePlayer]]
 
* [[Osiris/API/GetClosestAlivePlayer|GetClosestAlivePlayer]]
 
   
 
   
[[Category:Osiris Shared Mod Helpers]]
+
[[Category:Osiris Shared Mod Helpers|GetClosestAvailableCharacterTo]]

Latest revision as of 19:27, 29 January 2018

Full Definition(s)
  • PROC ProcGetClosestAvailableCharacterTo((CHARACTERGUID)_Obj, (INTEGER)_SightCheck)
  • PROC ProcGetClosestAvailableCharacterTo((CHARACTERGUID)_Obj, (INTEGER)_SightCheck, (INTEGER)_PartyCheck, (CHARACTERGUID)_Player)
  • PROC ProcGetClosestAvailableCharacterTo((CHARACTERGUID)_Obj, (INTEGER)_SightCheck, (INTEGER)_PartyCheck, (CHARACTERGUID)_Player, (CHARACTERGUID)_ExceptPlayer)
Description

The first invocation is equivalent to calling the second one with _PartyCheck == 0 and _Player == NULL.

The second invocation is equivalent to calling the third one with _ExceptPlayer === NULL .

Gets the closest player character to _Obj that is available to start a dialog with _Obj. Set _SightCheck to 1 if that character must be able to see _Obj. If _PartyCheck is 1, you must also and pass a valid parameter for _Player, and the found player character (if any) will be guaranteed to be in the same party as _Player. If _ExceptPlayer is not NULL, then this routine will consider _ExceptPlayer to be unavailable even if they pass the other checks.

Return Values
  • DB_ClosestAvailablePlayer((CHARACTERGUID)_Char,(CHARACTERGUID)_Obj): closest player that can start a dialog with _Obj (conforming to all requested conditions), if any.
  • DB_ClosestAvailablePlayer_NoAvailablePlayer((CHARACTERGUID)_Obj): Set if no player character is available that conforms to the requested conditions.
Notes
  • /
See Also