Difference between revisions of "GetLOS"

From the Fallout3 GECK Wiki
Jump to navigation Jump to search
imported>Geckbot
m (Robot: Automated text replacement (-Link to TES4 Construction Set Wiki +{{Incomplete}}\n\nLink to TES4 Construction Set Wiki))
imported>Gribbleshnibit8
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Incomplete}}
Link to TES4 Construction Set Wiki: [http://cs.elderscrolls.com/index.php?title=GetLOS GetLOS].


Link to TES4 Construction Set Wiki: [http://cs.elderscrolls.com/constwiki/index.php/GetLOS GetLOS].
'''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==
* 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. May CTD if GetLOS is called by an actor that was disabled in the previous frame. A delay of a few frames after the actor is enabled will solve this issue.
* The field of view for LOS is +/- 95 degrees from the 0 axis line in which the observer (non-player actor, player, or camera) is looking straight ahead.
** All creatures and non-player actors have the same field of view for LOS, regardless of eye placement, or if they even have heads (zombies) or eyes (will-o-wisps).


[[Category:Functions]]
[[Category:Functions]]
[[Category:Functions (GECK 1.1)]]
[[Category:Condition Functions]]
[[Category:Condition Functions]]
[[Category:Condition Functions (GECK 1.1)]]
[[Category:Actor Functions]]
[[Category:Actor Functions]]
[[Category:Actor Functions (GECK 1.1)]]

Latest revision as of 12:15, 26 May 2014

Link to TES4 Construction Set Wiki: GetLOS.

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. May CTD if GetLOS is called by an actor that was disabled in the previous frame. A delay of a few frames after the actor is enabled will solve this issue.
  • The field of view for LOS is +/- 95 degrees from the 0 axis line in which the observer (non-player actor, player, or camera) is looking straight ahead.
    • All creatures and non-player actors have the same field of view for LOS, regardless of eye placement, or if they even have heads (zombies) or eyes (will-o-wisps).