Difference between revisions of "OnGainLOS - Form"
Jump to navigation
Jump to search
imported>Rhavlovick m (1 revision: Clobber re-import by Henning) |
imported>Thingy Person |
||
Line 32: | Line 32: | ||
*Aliases and quests will automatically unregister for this event when the quest stops. Active magic effects will automatically unregister when they are removed. | *Aliases and quests will automatically unregister for this event when the quest stops. Active magic effects will automatically unregister when they are removed. | ||
*This event is '''not''' relayed to any aliases or magic effects attached to the form. | *This event is '''not''' relayed to any aliases or magic effects attached to the form. | ||
* | |||
== See Also == | == See Also == | ||
Line 42: | Line 43: | ||
*[[UnregisterForLOS - Form]] | *[[UnregisterForLOS - Form]] | ||
*[[OnLostLOS - Form]] | *[[OnLostLOS - Form]] | ||
*[[HasLOS - Actor]] |
Latest revision as of 12:34, 16 February 2021
Member of: ActiveMagicEffect Script, Alias Script, and Form Script
Event called when a viewer goes from not seeing the target, to seeing the target - if this active magic effect/alias/form is registered for it.
Syntax[edit | edit source]
Event OnGainLOS(Actor akViewer, ObjectReference akTarget)
Parameters[edit | edit source]
- akViewer: The Actor that sees the target.
- akTarget: The ObjectReference that the actor can now see.
Example[edit | edit source]
Function SomeFunction()
RegisterForSingleLOSGain(Game.GetPlayer(), SecretDocuments) ; Before we can use OnGainLOS we must register.
EndFunction
Event OnGainLOS(Actor akViewer, ObjectReference akTarget)
;/ If other registrations had been done, we would want to check the viewer and target
But since we only registered for one we know what it is
Since we only did single los gain, we'll only get this once /;
Debug.Trace("Player just saw the documents!")
endEvent
Notes[edit | edit source]
- Aliases and quests will automatically unregister for this event when the quest stops. Active magic effects will automatically unregister when they are removed.
- This event is not relayed to any aliases or magic effects attached to the form.