HasDetectionLOS - Actor

Member of: Actor Script

Checks to see if this actor as line-of-sight to the target object. Note that only the player can get line-of-sight to a non-actor.

If called on the player, HasDetectionLOS clips the line-of-sight check to the camera, so HasDetectionLOS will return false if the camera cannot see the object (even if there is a clear line-of-sight outside the camera's view). Also, three picks will be made at top, middle, and bottom. If any of the picks are unobstructed then HasDetectionLOS will return true.

SyntaxEdit

bool Function HasDetectionLOS(ObjectReference akOther) native

ParametersEdit

  • akOther: The object to check line-of-sight to.

Return ValueEdit

True if this actor has line-of-sight to the object.

ExamplesEdit

; Can the player see bob?
if (Game.GetPlayer().HasDetectionLOS(Bob_Alias.GetReference()))
  Debug.Trace("The player can see Bob")
endIf

See AlsoEdit