Background for Starfield
Member of the ScriptObject script
voidfunctionRegisterForDetectionLOSLost(ActorakViewer, ObjectReferenceakTarget)Native

Description

Wiki Description

Registers this script to receive a single OnLostLOS based on actor detection or current player camera view. If the viewer is not currently looking at the target, the event will be sent immediately.

Only the script that registers for an event will receive it. Other scripts attached to the same form, alias, or magic effect will not receive the event unless they also register for it.

Documentation Comment

Register for only the first detection-based LOS lost event between the viewer and the target
If the viewer is already not looking at the target, an event will be received almost immediately
If the viewer is not the player, the target must be another actor


Caveats

CK Wiki - Notes


Parameters

  1. ActorakViewer

    CK Wiki Description

    The Actor that will be looking for the target.

  2. ObjectReferenceakTarget

    CK Wiki Description

    The target the actor will be looking for. If the viewer is not the player, this must be an actor.


Examples

; Register for when the player looks away from the kettle
RegisterForDetectionLOSLost(Game.GetPlayer(), Kettle)

Auto-Generated Example

Actor myActor__akViewer
ObjectReference myObjectReference__akTarget

myScriptObject__toCallFunctionOn.RegisterForDetectionLOSLost(myActor__akViewer, myObjectReference__akTarget)

Related Pages


Additional References

View this function’s page on the Fallout 4 Creation Kit Wiki

Some data provided by the Fallout 4 Creation Kit Wiki. Licensed under the Creative Commons Attribution-Share Alike 4.0 license.