Difference between revisions of "Alias Script"

From the CreationKit Wiki
Jump to navigation Jump to search
imported>Rhavlovick
m (1 revision: Clobber re-import by Henning)
 
imported>Jog
Line 16: Line 16:


== Member Functions ==
== Member Functions ==
*Quest Function [[GetOwningQuest - Alias|GetOwningQuest]]()
'''Quest Function [[GetOwningQuest - Alias|GetOwningQuest]]()'''
**Returns the [[Quest Script|Quest]] that owns this alias.
*Returns the [[Quest Script|Quest]] that owns this alias.
*Function [[RegisterForAnimationEvent - Form|RegisterForAnimationEvent]](ObjectReference akSender, string asEventName)
 
**Registers this alias to receive the specified animation event from the specified object.
'''Function [[RegisterForAnimationEvent - Form|RegisterForAnimationEvent]](ObjectReference akSender, string asEventName)'''
*Function [[RegisterForLOS - Form|RegisterForLOS]](Actor akViewer, ObjectReference akTarget)
*Registers this alias to receive the specified animation event from the specified object.
**Registers this alias to receive gain and lost LOS events between the viewer and the target.
 
*Function [[RegisterForSingleLOSGain - Form|RegisterForSingleLOSGain]](Actor akViewer, ObjectReference akTarget)
'''Function [[RegisterForLOS - Form|RegisterForLOS]](Actor akViewer, ObjectReference akTarget)'''
**Registers this alias to receive a single LOS gain event when the viewer sees the target.
*Registers this alias to receive gain and lost LOS events between the viewer and the target.
*Function [[RegisterForSingleLOSLost - Form|RegisterForSingleLOSLost]](Actor akViewer, ObjectReference akTarget)
 
**Registers this alias to receive a single LOS lost event when the viewer loses sight of the target.
'''Function [[RegisterForSingleLOSGain - Form|RegisterForSingleLOSGain]](Actor akViewer, ObjectReference akTarget)'''
*Function [[RegisterForSingleUpdate - Form|RegisterForSingleUpdate]](float afInterval)
*Registers this alias to receive a single LOS gain event when the viewer sees the target.
**Registers this alias to receive a single update event in the specified time.
 
*Function [[RegisterForSingleUpdateGameTime - Form|RegisterForSingleUpdateGameTime]](float afInterval)
'''Function [[RegisterForSingleLOSLost - Form|RegisterForSingleLOSLost]](Actor akViewer, ObjectReference akTarget)'''
**Registers this alias to receive a single update event in the specified number of game hours.
*Registers this alias to receive a single LOS lost event when the viewer loses sight of the target.
*Function [[RegisterForSleep - Form|RegisterForSleep]]()
 
**Registers this alias to receive sleep events for when the player goes to sleep or wakes up.
'''Function [[RegisterForSingleUpdate - Form|RegisterForSingleUpdate]](float afInterval)'''
*Function [[RegisterForTrackedStatsEvent - Form|RegisterForTrackedStatsEvent]]()
*Registers this alias to receive a single update event in the specified time.
**Registers this alias to receive tracked stats events for when tracked stats are updated.
 
*Function [[RegisterForUpdate - Form|RegisterForUpdate]](float afInterval)
'''Function [[RegisterForSingleUpdateGameTime - Form|RegisterForSingleUpdateGameTime]](float afInterval)'''
**Registers this alias to receive update events with the specified interval, or changes the update interval.
*Registers this alias to receive a single update event in the specified number of game hours.
*Function [[RegisterForUpdateGameTime - Form|RegisterForUpdateGameTime]](float afInterval)
 
**Registers this alias to receive update events with the specified interval in game time hours, or changes the update interval.
'''Function [[RegisterForSleep - Form|RegisterForSleep]]()'''
*Function [[StartObjectProfiling - Form|StartObjectProfiling]]()
*Registers this alias to receive sleep events for when the player goes to sleep or wakes up.
**Starts profiling all scripts attached to this alias.
 
*Function [[StopObjectProfiling - Form|StopObjectProfiling]]()
'''Function [[RegisterForTrackedStatsEvent - Form|RegisterForTrackedStatsEvent]]()'''
**Stops profiling all scripts attached to this alias.
*Registers this alias to receive tracked stats events for when tracked stats are updated.
*Function [[UnregisterForAnimationEvent - Form|UnregisterForAnimationEvent]](ObjectReference akSender, string asEventName)
 
**Unregisters this alias from receiving the specified animation event from the specified object.
'''Function [[RegisterForUpdate - Form|RegisterForUpdate]](float afInterval)'''
*Function [[UnregisterForLOS - Form|UnregisterForLOS]](Actor akViewer, ObjectReference akTarget)
*Registers this alias to receive update events with the specified interval, or changes the update interval.
**Unregisters this alias from any LOS events between the viewer and target.
 
*Function [[UnregisterForSleep - Form|UnregisterForSleep]]()
'''Function [[RegisterForUpdateGameTime - Form|RegisterForUpdateGameTime]](float afInterval)'''
**Unregisters this alias from sleep events.
*Registers this alias to receive update events with the specified interval in game time hours, or changes the update interval.
*Function [[UnregisterForTrackedStatsEvent - Form|UnregisterForTrackedStatsEvent]]()
 
**Unregisters this alias from tracked stats events.
'''Function [[StartObjectProfiling - Form|StartObjectProfiling]]()'''
*Function [[UnregisterForUpdate - Form|UnregisterForUpdate]]()
*Starts profiling all scripts attached to this alias.
**Unregisters this alias from update events.
 
*Function [[UnregisterForUpdateGameTime - Form|UnregisterForUpdateGameTime]]()
'''Function [[StopObjectProfiling - Form|StopObjectProfiling]]()'''
**Unregisters this alias from game time update events.
*Stops profiling all scripts attached to this alias.
 
'''Function [[UnregisterForAnimationEvent - Form|UnregisterForAnimationEvent]](ObjectReference akSender, string asEventName)'''
*Unregisters this alias from receiving the specified animation event from the specified object.
 
'''Function [[UnregisterForLOS - Form|UnregisterForLOS]](Actor akViewer, ObjectReference akTarget)'''
*Unregisters this alias from any LOS events between the viewer and target.
 
'''Function [[UnregisterForSleep - Form|UnregisterForSleep]]()'''
*Unregisters this alias from sleep events.
 
'''Function [[UnregisterForTrackedStatsEvent - Form|UnregisterForTrackedStatsEvent]]()'''
*Unregisters this alias from tracked stats events.
 
'''Function [[UnregisterForUpdate - Form|UnregisterForUpdate]]()'''
*Unregisters this alias from update events.
 
'''Function [[UnregisterForUpdateGameTime - Form|UnregisterForUpdateGameTime]]()'''
*Unregisters this alias from game time update events.


== Events ==
== Events ==

Revision as of 13:40, 20 February 2012

Native base script for every alias in the game. Don't confuse this for ReferenceAlias Script which you are more likely to use.

Definition

ScriptName Alias

Properties

None

Global Functions

None

Member Functions

Quest Function GetOwningQuest()

  • Returns the Quest that owns this alias.

Function RegisterForAnimationEvent(ObjectReference akSender, string asEventName)

  • Registers this alias to receive the specified animation event from the specified object.

Function RegisterForLOS(Actor akViewer, ObjectReference akTarget)

  • Registers this alias to receive gain and lost LOS events between the viewer and the target.

Function RegisterForSingleLOSGain(Actor akViewer, ObjectReference akTarget)

  • Registers this alias to receive a single LOS gain event when the viewer sees the target.

Function RegisterForSingleLOSLost(Actor akViewer, ObjectReference akTarget)

  • Registers this alias to receive a single LOS lost event when the viewer loses sight of the target.

Function RegisterForSingleUpdate(float afInterval)

  • Registers this alias to receive a single update event in the specified time.

Function RegisterForSingleUpdateGameTime(float afInterval)

  • Registers this alias to receive a single update event in the specified number of game hours.

Function RegisterForSleep()

  • Registers this alias to receive sleep events for when the player goes to sleep or wakes up.

Function RegisterForTrackedStatsEvent()

  • Registers this alias to receive tracked stats events for when tracked stats are updated.

Function RegisterForUpdate(float afInterval)

  • Registers this alias to receive update events with the specified interval, or changes the update interval.

Function RegisterForUpdateGameTime(float afInterval)

  • Registers this alias to receive update events with the specified interval in game time hours, or changes the update interval.

Function StartObjectProfiling()

  • Starts profiling all scripts attached to this alias.

Function StopObjectProfiling()

  • Stops profiling all scripts attached to this alias.

Function UnregisterForAnimationEvent(ObjectReference akSender, string asEventName)

  • Unregisters this alias from receiving the specified animation event from the specified object.

Function UnregisterForLOS(Actor akViewer, ObjectReference akTarget)

  • Unregisters this alias from any LOS events between the viewer and target.

Function UnregisterForSleep()

  • Unregisters this alias from sleep events.

Function UnregisterForTrackedStatsEvent()

  • Unregisters this alias from tracked stats events.

Function UnregisterForUpdate()

  • Unregisters this alias from update events.

Function UnregisterForUpdateGameTime()

  • Unregisters this alias from game time update events.

Events

  • Event OnAnimationEvent(ObjectReference akSource, string asEventName)
    • Received when one of animation events we are listening for is received.
  • Event OnAnimationEventUnregistered(ObjectReference akSource, string asEventName)
    • Received when one of the animation events we are listening for has been automatically unregistered by the game due to the target animation graph unloading.
  • Event OnGainLOS(Actor akViewer, ObjectReference akTarget)
    • Received when the viewer goes from not seeing the target to seeing the target - if this alias is registered.
  • Event OnLostLOS(Actor akViewer, ObjectReference akTarget)
    • Received when the viewer goes from seeing the target to not seeing the target - if this alias is registered.
  • Event OnReset()
    • Event received when this object is reset (usually when the quest the alias is attached to starts up).
  • Event OnSleepStart(float afSleepStartTime, float afDesiredSleepEndTime)
    • Received when the player goes to sleep.
  • Event OnSleepStop(bool abInterrupted)
    • Received when the player wakes up or is interrupted in sleep.
  • Event OnTrackedStatsEvent(string asStat, int aiStatValue)
    • Received when tracked stats are updated.
  • Event OnUpdate()
    • Received at periodic intervals, if the alias is registered.
  • Event OnUpdateGameTime()
    • Received at periodic intervals of game time, if the alias is registered.

Notes