Osiris/Shared/ProcGetClosestAvailableCharacterTo
From Divinity Engine Wiki
Full Definition(s)
- PROC ProcGetClosestAvailableCharacterTo((CHARACTERGUID)_Obj,(INTEGER)_SightCheck)
- PROC ProcGetClosestAvailableCharacterTo((CHARACTERGUID)_Obj,(INTEGER)_SightCheck,(INTEGER)_PartyCheck,(CHARACTERGUID)_Player)
Description
The first invocation is equivalent to calling the second one with _PartyCheck == 0 and _Player == 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.
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
- /