GetLOS

From the CreationKit Wiki
Jump to navigation Jump to search

Syntax:

[ActorID.]GetLOS ObjectID 

Example:

testActor.GetLOS TestMarker


Returns true if calling actor has line of sight to the specified object. Can only be called on actors.

Notes[edit | edit source]

  • When called on a non-player actor, the supplied ObjectID must be another actor or getLOS will return false, even when the object is within line of sight.
  • When called on the player...
    • ...non-actors can be specified as an objectID.
      • If the objectID parameter is not an actor, however, this function is quite slow and should not be run every frame.
    • ...it returns true if the camera can see the object, not if the player-character can see the object. This means that in Third-Person, GetLOS may return true for objects behind the player, if they are close enough that they can be seen with the camera.
  • When called on a disabled actor, it crashes the game

Papyrus Version[edit | edit source]

HasLOS - Actor