Osiris/API/HasLineOfSight: Difference between revisions

From Divinity Engine Wiki
Jump to navigation Jump to search
(Created page with "===== Full Definition(s) ===== * call '''CharacterIgnoreActiveCrimes'''('''[in]'''''(GUIDSTRING)'''''_source''', '''[in]'''''(GUIDSTRING)'''''_target''', '''[out]'''''(INTEGER...")
 
(call -> query, put into standard template form)
 
Line 1: Line 1:
===== Full Definition(s) =====
===== Full Definition(s) =====
* call '''CharacterIgnoreActiveCrimes'''('''[in]'''''(GUIDSTRING)'''''_source''', '''[in]'''''(GUIDSTRING)'''''_target''', '''[out]'''''(INTEGER)'''''_bool''')
* query '''HasLineOfSight'''('''''[in]'''(GUIDSTRING)'''''_Source''', '''''[in]'''(GUIDSTRING)'''''_Target''', '''''[out]'''(INTEGER)'''''_Bool''')
===== Description =====
===== Description =====
Checks if there's a line of sight between source and target. <br />
Checks if there is a line of sight between source and target: whether an unobstructed 3D-line can be drawn between the two objects.
Basically, a simple 3D line check.<br />
===== Return Values =====
Doesn't take into account sneaking, statuses or anything else.
* '''Success/Failure''': Fails if '''_Source''' or '''_Target''' does not exist, or if there is no active level.
* '''_Bool''': if there is a straight line of vision between '''_Source''' and '''_Target''' according to the level's [[AI_grid_panel#Show_Vision_Grid|vision grid]].
===== Notes =====
* This query does not take into account sneaking, sight ranges, statuses, or anything else.
* The objects can be any kind of object (character, item, trigger, spline, ...).
===== See Also =====
* [[Osiris/API/CharacterCanSee|CharacterCanSee]]
* [[Osiris/API/CharacterSawCharacter|CharacterSawCharacter]]


 
[[Category:Osiris Queries|HasLineOfSight]]
[[Category:Osiris Queries|CharacterIgnoreActiveCrimes]]
[[Category:Osiris Queries (Added in DOS2DE)|HasLineOfSight]]
[[Category:Osiris Queries (Added in DOS2DE)|CharacterIgnoreActiveCrimes]]

Latest revision as of 20:34, 13 September 2018

Full Definition(s)
  • query HasLineOfSight([in](GUIDSTRING)_Source, [in](GUIDSTRING)_Target, [out](INTEGER)_Bool)
Description

Checks if there is a line of sight between source and target: whether an unobstructed 3D-line can be drawn between the two objects.

Return Values
  • Success/Failure: Fails if _Source or _Target does not exist, or if there is no active level.
  • _Bool: if there is a straight line of vision between _Source and _Target according to the level's vision grid.
Notes
  • This query does not take into account sneaking, sight ranges, statuses, or anything else.
  • The objects can be any kind of object (character, item, trigger, spline, ...).
See Also