Osiris/API/CharacterCanSee

From Divinity Engine Wiki
Revision as of 23:19, 22 January 2019 by Tinkerer (talk | contribs) (Documented CharacterCanSee)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Full Definition(s)
  • query CharacterCanSee([in](CHARACTERGUID)_Character, [in](GUIDSTRING)_Target, [out](INTEGER)_Bool)
Description

Returns whether _Character can see _Target. This call takes sneaking into account. Additionally, if _Character is an NPC or a summon, and _Target is also a character, this query registers a temporary event generator for that pair to throw CharacterSawCharacter and CharacterLostSightOfCharacter events.

Return Values
  • Success/Failure: Fails if _Character is invalid, or if _Target is not in the current level.
  • _Bool: 1 if _Character can see _Target, 0 if not.
Notes
  • If _Character is an NPC or a summon, and _Target is a character, then calling this routine will create a temporary sight relation between these two. See CharacterSawCharacter for more information.
See Also