RegisterForDetectionLOSLost - ScriptObject

From the Fallout4 CreationKit Wiki
Jump to navigation Jump to search

Member of: ScriptObject

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.

Syntax[edit | edit source]

Function RegisterForDetectionLOSLost(Actor akViewer, ObjectReference akTarget) native

Parameters[edit | edit source]

  • akViewer: The Actor that will be looking for the target.
  • akTarget: The target the actor will be looking for. If the viewer is not the player, this must be an actor.

Return Value[edit | edit source]

None

Examples[edit | edit source]

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

Notes[edit | edit source]

See Also[edit | edit source]