Difference between revisions of "ActiveMagicEffect Script"

282 bytes added ,  04:31, 24 October 2013
Formatting change.
imported>Wafflesalot
(Added links to GetDuration and GetTimeElapsed)
imported>CraftySentinel
(Formatting change.)
Line 14: Line 14:
</source>
</source>


== Properties ==
None


== Global Functions ==
== Member Functions ==
None
{|class="wikitable" width =100%
!style="text-align:left;"|Function
!style="text-align:left;"|Description
|-
|[[AddInventoryEventFilter - ObjectReference|'''AddInventoryEventFilter'''(Form ''akFilter'')]]
|Adds an inventory event filter to this effect.
|-


== Member Functions ==
|[[Dispel - ActiveMagicEffect|'''Dispel'''()]]
'''Function [[AddInventoryEventFilter - ObjectReference|AddInventoryEventFilter]](Form akFilter)'''
|Dispels this active magic effect.
*Adds an inventory event filter to this effect.
|-


'''Function [[Dispel - ActiveMagicEffect|Dispel]]()'''
|[[GetBaseObject - ActiveMagicEffect|MagicEffect '''GetBaseObject'''()]]
*Dispels this active magic effect.
|Obtains the [[MagicEffect Script|MagicEffect]] this active magic effect is based on.
|-


'''MagicEffect Function [[GetBaseObject - ActiveMagicEffect|GetBaseObject]]()'''
|[[GetCasterActor - ActiveMagicEffect|Actor '''GetCasterActor'''()]]
*Obtains the [[MagicEffect Script|MagicEffect]] this active magic effect is based on.
|Obtains the [[Actor Script|Actor]] that cast the spell this magic effect is from.
|-


'''Actor Function [[GetCasterActor - ActiveMagicEffect|GetCasterActor]]()'''
|[[GetTargetActor - ActiveMagicEffect|Actor '''GetTargetActor'''()]]
*Obtains the [[Actor Script|Actor]] that cast the spell this magic effect is from.
|Obtains the [[Actor Script|Actor]] this active magic effect is applied to.
|-


'''Actor Function [[GetTargetActor - ActiveMagicEffect|GetTargetActor]]()'''
|[[RegisterForAnimationEvent - Form|'''RegisterForAnimationEvent'''(ObjectReference ''akSender'', String ''asEventName'')]]
*Obtains the [[Actor Script|Actor]] this active magic effect is applied to.
|Registers this magic effect to receive the specified animation event from the specified object.
|-


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


'''Function [[RegisterForLOS - Form|RegisterForLOS]](Actor akViewer, ObjectReference akTarget)'''
|[[RegisterForSingleLOSGain - Form|'''RegisterForSingleLOSGain'''(Actor ''akViewer'', ObjectReference ''akTarget'')]]
*Registers this magic effect to receive gain and lost LOS events between the viewer and the target.
|Registers this magic effect to receive a single LOS gain event when the viewer sees the target.
|-


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


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


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


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


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


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


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


'''Function [[RegisterForUpdateGameTime - Form|RegisterForUpdateGameTime]](float afInterval)'''
|[[RemoveAllInventoryEventFilters - ObjectReference|'''RemoveAllInventoryEventFilters'''()]]
*Registers this magic effect to receive update events with the specified interval in game time hours, or changes the update interval.
|Remove all inventory event filters on this effect.
|-


'''Function [[RemoveAllInventoryEventFilters - ObjectReference|RemoveAllInventoryEventFilters]]()'''
|[[RemoveInventoryEventFilter - ObjectReference|'''RemoveInventoryEventFilter'''(Form ''akFilter'')]]
*Remove all inventory event filters on this effect.
|Remove a specific inventory event filter.
|-


'''Function [[RemoveInventoryEventFilter - ObjectReference|RemoveInventoryEventFilter]](Form akFilter)'''
|[[StartObjectProfiling - Form|'''StartObjectProfiling'''()]]
*Remove a specific inventory event filter.
|Starts profiling all scripts attached to this magic effect.
|-


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


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


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


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


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


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


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


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


== SKSE Member Functions ==
== SKSE Member Functions ==


'''float Function [[GetDuration - ActiveMagicEffect|GetDuration]]()'''
{|class="wikitable" width =100%
*Returns the Duration of the magic effect.
!style="text-align:left;"|Function
!style="text-align:left;"|Description
|-
|[[GetDuration - ActiveMagicEffect|Float '''GetDuration'''()]]
|Returns the Duration of the magic effect.
|-
 
|[[GetTimeElapsed - ActiveMagicEffect|Float '''GetTimeElapsed'''()]]
|Returns the Time Elapsed of the magic effect.
|-
 
|}


'''float Function [[GetTimeElapsed - ActiveMagicEffect|GetTimeElapsed]]()'''
*Returns the Time Elapsed of the magic effect.
== Events ==
== Events ==
'''Event [[OnAnimationEvent - Form|OnAnimationEvent]](ObjectReference akSource, string asEventName)'''
{|class="wikitable" width =100%
*Received when one of animation events we are listening for is recieved.
!style="text-align:left;"|Function
!style="text-align:left;"|Description
|-
|[[OnAnimationEvent - Form|'''OnAnimationEvent'''(ObjectReference ''akSource'', String ''asEventName'')]]
|Received when one of animation events we are listening for is recieved.
|-
 
|[[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 [[OnAnimationEventUnregistered - Form|OnAnimationEventUnregistered]](ObjectReference akSource, string asEventName)'''
|[[OnEffectStart - ActiveMagicEffect|'''OnEffectStart'''(Actor ''akTarget'', Actor ''akCaster'')]]
*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 received when this effect starts
|-


'''Event [[OnEffectStart - ActiveMagicEffect|OnEffectStart]](Actor akTarget, Actor akCaster)'''
|[[OnEffectFinish - ActiveMagicEffect|'''OnEffectFinish'''(Actor ''akTarget'', Actor ''akCaster'')]]
*Event received when this effect starts
|Event received when this effect has finished
|-


'''Event [[OnEffectFinish - ActiveMagicEffect|OnEffectFinish]](Actor akTarget, Actor akCaster)'''
|[[OnGainLOS - Form|'''OnGainLOS'''(Actor ''akViewer'', ObjectReference ''akTarget'')]]
*Event received when this effect has finished
|Received when the viewer goes from not seeing the target to seeing the target - if this magic effect is registered.
|-


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


'''Event [[OnLostLOS - Form|OnLostLOS]](Actor akViewer, ObjectReference akTarget)'''
|[[OnSleepStart - Form|'''OnSleepStart'''(Float ''afSleepStartTime'', Float ''afDesiredSleepEndTime'')]]
*Received when the viewer goes from seeing the target to not seeing the target - if this magic effect is registered.
|Received when the player goes to sleep.
|-


'''Event [[OnSleepStart - Form|OnSleepStart]](float afSleepStartTime, float afDesiredSleepEndTime)'''
|[[OnSleepStop - Form|'''OnSleepStop'''(Bool ''abInterrupted'')]]
*Received when the player goes to sleep.
|Received when the player wakes up or is interrupted in sleep.
|-


'''Event [[OnSleepStop - Form|OnSleepStop]](bool abInterrupted)'''
|[[OnTrackedStatsEvent - Form|'''OnTrackedStatsEvent'''(String ''asStat'', Int ''aiStatValue'')]]
*Received when the player wakes up or is interrupted in sleep.
|Received when tracked stats are updated.
|-


'''Event [[OnTrackedStatsEvent - Form|OnTrackedStatsEvent]](string asStat, int aiStatValue)'''
|[[OnUpdate - Form|'''OnUpdate'''()]]
*Received when tracked stats are updated.
|Received at periodic intervals, if the magic effect is registered.
|-


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


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


== Notes ==


ActiveMagicEffects will also receive events from the [[Actor Script#Events|Actor]] they are attached to.
*ActiveMagicEffects will also receive events from the [[Actor Script#Events|Actor]] they are attached to.