Mod:Creation Kit/RegisterForDetectionLOSLost - ScriptObject

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
Function RegisterForDetectionLOSLost(Actor akViewer, ObjectReference akTarget) native

Parameters

 * 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
None

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