Background for Skyrim SE
Member of the Actor script
boolfunctionHasLOS(ObjectReferenceakOther)Native

Description

Wiki Description

Checks to see if this actor has 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, HasLOS clips the line-of-sight check to the camera, so HasLOS 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 HasLOS will return true.

Documentation Comment

Sees if this actor has line-of-sight to another object. Only the player can check LOS to a non-actor


Parameters

  1. ObjectReferenceakOther

    CK Wiki Description

    The object to check line-of-sight to.


Examples

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

Auto-Generated Example

ObjectReference myObjectReference__akOther

bool returnedValue = myActor__toCallFunctionOn.HasLOS(myObjectReference__akOther)

Related Pages


Additional References

View this function’s page on the Skyrim Creation Kit Wiki

Some data provided by the Skyrim Creation Kit Wiki. Licensed under the Creative Commons Attribution-ShareAlike license.