RegisterForDirectLOSLost - ScriptObject

Revision as of 12:26, 3 December 2015 by imported>Plplecuyer
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Member of: ScriptObject

Registers this script to receive a single OnLostLOS based on a direct LOS pick. If the viewer can not currently see 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.

SyntaxEdit

Function RegisterForDirectLOSLost(ObjectReference akViewer, ObjectReference akTarget, string asViewerNode = "", \
  string asTargetNode = "") native

ParametersEdit

  • akViewer: The ObjectReference 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.
  • asViewerNode: The node on the viewer to cast the LOS check from. If empty, will cast from the object's root.
    • Default: ""
  • asTargetNode: The node on the target to cast the LOS check to. If empty, will cast to the object's root.
    • Default: ""

Return ValueEdit

None

ExamplesEdit

; Register for when the player can't see the kettle
RegisterForDirectLOSLost(Game.GetPlayer(), Kettle)


; Register for when the player's head can't see the kettle
RegisterForDirectLOSLost(Game.GetPlayer(), Kettle, "Head")

NotesEdit

See AlsoEdit