Difference between revisions of "Alias Script"

358 bytes added ,  04:44, 24 October 2013
m
Formatting Change
imported>Bot Owned
imported>CraftySentinel
m (Formatting Change)
Line 16: Line 16:


== Member Functions ==
== Member Functions ==
'''Quest Function [[GetOwningQuest - Alias|GetOwningQuest]]()'''
*Returns the [[Quest Script|Quest]] that owns this alias.


'''Function [[RegisterForAnimationEvent - Form|RegisterForAnimationEvent]](ObjectReference akSender, string asEventName)'''
{|class="wikitable" width =100%
*Registers this alias to receive the specified animation event from the specified object.
!style="text-align:left;" width=25%|Function
!style="text-align:left;"|Description
|-
|[[GetOwningQuest - Alias|Quest '''GetOwningQuest'''()]]
|Returns the [[Quest Script|Quest]] that owns this alias.
|-


'''Function [[RegisterForLOS - Form|RegisterForLOS]](Actor akViewer, ObjectReference akTarget)'''
|[[RegisterForAnimationEvent - Form|'''RegisterForAnimationEvent'''(ObjectReference ''akSender'', String ''asEventName'')]]
*Registers this alias to receive gain and lost LOS events between the viewer and the target.
|Registers this alias to receive the specified animation event from the specified object.
|-


'''Function [[RegisterForSingleLOSGain - Form|RegisterForSingleLOSGain]](Actor akViewer, ObjectReference akTarget)'''
|[[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)'''
|[[RegisterForSingleLOSGain - Form|'''RegisterForSingleLOSGain'''(Actor ''akViewer'', ObjectReference ''akTarget'')]]
*Registers this alias to receive a single LOS lost event when the viewer loses sight of the target.
|Registers this alias to receive a single LOS gain event when the viewer sees the target.
|-


'''Function [[RegisterForSingleUpdate - Form|RegisterForSingleUpdate]](float afInterval)'''
|[[RegisterForSingleLOSLost - Form|'''RegisterForSingleLOSLost'''(Actor ''akViewer'', ObjectReference ''akTarget'')]]
*Registers this alias to receive a single update event in the specified time.
|Registers this alias to receive a single LOS lost event when the viewer loses sight of the target.
|-


'''Function [[RegisterForSingleUpdateGameTime - Form|RegisterForSingleUpdateGameTime]](float afInterval)'''
|[[RegisterForSingleUpdate - Form|'''RegisterForSingleUpdate'''(Float ''afInterval'')]]
*Registers this alias to receive a single update event in the specified number of game hours.
|Registers this alias to receive a single update event in the specified time.
|-


'''Function [[RegisterForSleep - Form|RegisterForSleep]]()'''
|[[RegisterForSingleUpdateGameTime - Form|'''RegisterForSingleUpdateGameTime'''(Float ''afInterval'')]]
*Registers this alias to receive sleep events for when the player goes to sleep or wakes up.
|Registers this alias to receive a single update event in the specified number of game hours.
|-


'''Function [[RegisterForTrackedStatsEvent - Form|RegisterForTrackedStatsEvent]]()'''
|[[RegisterForSleep - Form|'''RegisterForSleep'''()]]
*Registers this alias to receive tracked stats events for when tracked stats are updated.
|Registers this alias to receive sleep events for when the player goes to sleep or wakes up.
|-


'''Function [[RegisterForUpdate - Form|RegisterForUpdate]](float afInterval)'''
|[[RegisterForTrackedStatsEvent - Form|'''RegisterForTrackedStatsEvent'''()]]
*Registers this alias to receive update events with the specified interval, or changes the update interval.
|Registers this alias to receive tracked stats events for when tracked stats are updated.
|-


'''Function [[RegisterForUpdateGameTime - Form|RegisterForUpdateGameTime]](float afInterval)'''
|[[RegisterForUpdate - Form|'''RegisterForUpdate'''(Float ''afInterval'')]]
*Registers this alias to receive update events with the specified interval in game time hours, or changes the update interval.
|Registers this alias to receive update events with the specified interval, or changes the update interval.
|-


'''Function [[StartObjectProfiling - Form|StartObjectProfiling]]()'''
|[[RegisterForUpdateGameTime - Form|'''RegisterForUpdateGameTime'''(Float ''afInterval'')]]
*Starts profiling all scripts attached to this alias.
|Registers this alias to receive update events with the specified interval in game time hours, or changes the update interval.
|-


'''Function [[StopObjectProfiling - Form|StopObjectProfiling]]()'''
|[[StartObjectProfiling - Form|'''StartObjectProfiling'''()]]
*Stops profiling all scripts attached to this alias.
|Starts profiling all scripts attached to this alias.
|-


'''Function [[UnregisterForAnimationEvent - Form|UnregisterForAnimationEvent]](ObjectReference akSender, string asEventName)'''
|[[StopObjectProfiling - Form|'''StopObjectProfiling'''()]]
*Unregisters this alias from receiving the specified animation event from the specified object.
|Stops profiling all scripts attached to this alias.
|-


'''Function [[UnregisterForLOS - Form|UnregisterForLOS]](Actor akViewer, ObjectReference akTarget)'''
|[[UnregisterForAnimationEvent - Form|'''UnregisterForAnimationEvent'''(ObjectReference ''akSender'', String ''asEventName'')]]
*Unregisters this alias from any LOS events between the viewer and target.
|Unregisters this alias from receiving the specified animation event from the specified object.
|-


'''Function [[UnregisterForSleep - Form|UnregisterForSleep]]()'''
|[[UnregisterForLOS - Form|'''UnregisterForLOS'''(Actor ''akViewer'', ObjectReference ''akTarget'')]]
*Unregisters this alias from sleep events.
|Unregisters this alias from any LOS events between the viewer and target.
|-


'''Function [[UnregisterForTrackedStatsEvent - Form|UnregisterForTrackedStatsEvent]]()'''
|[[UnregisterForSleep - Form|'''UnregisterForSleep'''()]]
*Unregisters this alias from tracked stats events.
|Unregisters this alias from sleep events.
|-


'''Function [[UnregisterForUpdate - Form|UnregisterForUpdate]]()'''
|[[UnregisterForTrackedStatsEvent - Form|'''UnregisterForTrackedStatsEvent'''()]]
*Unregisters this alias from update events.
|Unregisters this alias from tracked stats events.
|-


'''Function [[UnregisterForUpdateGameTime - Form|UnregisterForUpdateGameTime]]()'''
|[[UnregisterForUpdate - Form|'''UnregisterForUpdate'''()]]
*Unregisters this alias from game time update events.
|Unregisters this alias from update events.
|-
 
|[[UnregisterForUpdateGameTime - Form|'''UnregisterForUpdateGameTime'''()]]
|Unregisters this alias from game time update events.
|-
 
|}


== SKSE Member Functions ==
== SKSE Member Functions ==
'''String Function [[GetName - Alias|GetName]]()'''
* Returns the name of the alias.


'''Int Function [[GetID - Alias| GetID]]()'''
{|class="wikitable" width =100%
* Returns the ID of the alias.
!style="text-align:left;" width=25%|Function
!style="text-align:left;"|Description
|-
|[[GetName - Alias|String '''GetName'''()]]
| Returns the name of the alias.
|-
 
|[[GetID - Alias|Int '''GetID'''()]]
| Returns the ID of the alias.
|-
 
|}


== Events ==
== Events ==
'''Event [[OnAnimationEvent - Form|OnAnimationEvent]](ObjectReference akSource, string asEventName)'''
*Received when one of animation events we are listening for is received.


'''Event [[OnAnimationEventUnregistered - Form|OnAnimationEventUnregistered]](ObjectReference akSource, string asEventName)'''
{|class="wikitable" width =100%
*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.
!style="text-align:left;" width=25%|Function
!style="text-align:left;"|Description
|-
|[[OnAnimationEvent - Form|'''OnAnimationEvent'''(ObjectReference ''akSource'', String ''asEventName'')]]
|Received when one of animation events we are listening for is received.
|-
 
|[[OnAnimationEventUnregistered - Form|'''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 - Form|OnGainLOS]](Actor akViewer, ObjectReference akTarget)'''
|[[OnGainLOS - Form|'''OnGainLOS'''(Actor ''akViewer'', ObjectReference ''akTarget'')]]
*Received when the viewer goes from not seeing the target to seeing the target - if this alias is registered.
|Received when the viewer goes from not seeing the target to seeing the target - if this alias is registered.
|-


'''Event [[OnLostLOS - Form|OnLostLOS]](Actor akViewer, ObjectReference akTarget)'''
|[[OnLostLOS - Form|'''OnLostLOS'''(Actor ''akViewer'', ObjectReference ''akTarget'')]]
*Received when the viewer goes from seeing the target to not seeing the target - if this alias is registered.
|Received when the viewer goes from seeing the target to not seeing the target - if this alias is registered.
|-


'''Event [[OnReset - ObjectReference|OnReset]]()'''
|[[OnReset - ObjectReference|'''OnReset'''()]]
*Event received when this object is reset (usually when the quest the alias is attached to starts up).
|Event received when this object is reset (usually when the quest the alias is attached to starts up).
|-


'''Event [[OnSleepStart - Form|OnSleepStart]](float afSleepStartTime, float afDesiredSleepEndTime)'''
|[[OnSleepStart - Form|'''OnSleepStart'''(Float ''afSleepStartTime'', Float ''afDesiredSleepEndTime'')]]
*Received when the player goes to sleep.
|Received when the player goes to sleep.
|-


'''Event [[OnSleepStop - Form|OnSleepStop]](bool abInterrupted)'''
|[[OnSleepStop - Form|'''OnSleepStop'''(Bool ''abInterrupted'')]]
*Received when the player wakes up or is interrupted in sleep.
|Received when the player wakes up or is interrupted in sleep.
|-


'''Event [[OnTrackedStatsEvent - Form|OnTrackedStatsEvent]](string asStat, int aiStatValue)'''
|[[OnTrackedStatsEvent - Form|'''OnTrackedStatsEvent'''(String ''asStat'', Int ''aiStatValue'')]]
*Received when tracked stats are updated.
|Received when tracked stats are updated.
|-


'''Event [[OnUpdate - Form|OnUpdate]]()'''
|[[OnUpdate - Form|'''OnUpdate'''()]]
*Received at periodic intervals, if the alias is registered.
|Received at periodic intervals, if the alias is registered.
|-


'''Event [[OnUpdateGameTime - Form|OnUpdateGameTime]]()'''
|[[OnUpdateGameTime - Form|'''OnUpdateGameTime'''()]]
*Received at periodic intervals of game time, if the alias is registered.
|Received at periodic intervals of game time, if the alias is registered.
|-


|}
==Notes==
==Notes==
*This object is often confused with [[ReferenceAlias Script]]. You probably mean to be using that.
*This object is often confused with [[ReferenceAlias Script]]. You probably mean to be using that.