Difference between revisions of "ActiveMagicEffect Script"

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


== Member Functions ==
== Member Functions ==
*Function [[AddInventoryEventFilter - ObjectReference|AddInventoryEventFilter]](Form akFilter)
'''Function [[AddInventoryEventFilter - ObjectReference|AddInventoryEventFilter]](Form akFilter)'''
**Adds an inventory event filter to this effect.
*Adds an inventory event filter to this effect.
*Function [[Dispel - ActiveMagicEffect|Dispel]]()
 
**Dispels this active magic effect.
'''Function [[Dispel - ActiveMagicEffect|Dispel]]()'''
*MagicEffect Function [[GetBaseObject - ActiveMagicEffect|GetBaseObject]]()
*Dispels this active magic effect.
**Obtains the [[MagicEffect Script|MagicEffect]] this active magic effect is based on.
 
*Actor Function [[GetCasterActor - ActiveMagicEffect|GetCasterActor]]()
'''MagicEffect Function [[GetBaseObject - ActiveMagicEffect|GetBaseObject]]()'''
**Obtains the [[Actor Script|Actor]] that cast the spell this magic effect is from.
*Obtains the [[MagicEffect Script|MagicEffect]] this active magic effect is based on.
*Actor Function [[GetTargetActor - ActiveMagicEffect|GetTargetActor]]()
 
**Obtains the [[Actor Script|Actor]] this active magic effect is applied to.
'''Actor Function [[GetCasterActor - ActiveMagicEffect|GetCasterActor]]()'''
*Function [[RegisterForAnimationEvent - Form|RegisterForAnimationEvent]](ObjectReference akSender, string asEventName)
*Obtains the [[Actor Script|Actor]] that cast the spell this magic effect is from.
**Registers this magic effect to receive the specified animation event from the specified object.
 
*Function [[RegisterForLOS - Form|RegisterForLOS]](Actor akViewer, ObjectReference akTarget)
'''Actor Function [[GetTargetActor - ActiveMagicEffect|GetTargetActor]]()'''
**Registers this magic effect to receive gain and lost LOS events between the viewer and the target.
*Obtains the [[Actor Script|Actor]] this active magic effect is applied to.
*Function [[RegisterForSingleLOSGain - Form|RegisterForSingleLOSGain]](Actor akViewer, ObjectReference akTarget)
 
**Registers this magic effect to receive a single LOS gain event when the viewer sees the target.
'''Function [[RegisterForAnimationEvent - Form|RegisterForAnimationEvent]](ObjectReference akSender, string asEventName)'''
*Function [[RegisterForSingleLOSLost - Form|RegisterForSingleLOSLost]](Actor akViewer, ObjectReference akTarget)
*Registers this magic effect to receive the specified animation event from the specified object.
**Registers this magic effect to receive a single LOS lost event when the viewer loses sight of the target.
 
*Function [[RegisterForSingleUpdate - Form|RegisterForSingleUpdate]](float afInterval)
'''Function [[RegisterForLOS - Form|RegisterForLOS]](Actor akViewer, ObjectReference akTarget)'''
**Registers this magic effect to receive a single update event in the specified time.
*Registers this magic effect to receive gain and lost LOS events between the viewer and the target.
*Function [[RegisterForSingleUpdateGameTime - Form|RegisterForSingleUpdateGameTime]](float afInterval)
 
**Registers this magic effect to receive a single update event in the specified number of game hours.
'''Function [[RegisterForSingleLOSGain - Form|RegisterForSingleLOSGain]](Actor akViewer, ObjectReference akTarget)'''
*Function [[RegisterForSleep - Form|RegisterForSleep]]()
*Registers this magic effect to receive a single LOS gain event when the viewer sees the target.
**Registers this magic effect to receive sleep events for when the player goes to sleep or wakes up.
 
*Function [[RegisterForTrackedStatsEvent - Form|RegisterForTrackedStatsEvent]]()
'''Function [[RegisterForSingleLOSLost - Form|RegisterForSingleLOSLost]](Actor akViewer, ObjectReference akTarget)'''
**Registers this magic effect to receive tracked stats events for when tracked stats are updated.
*Registers this magic effect to receive a single LOS lost event when the viewer loses sight of the target.
*Function [[RegisterForUpdate - Form|RegisterForUpdate]](float afInterval)
 
**Registers this magic effect to receive update events with the specified interval, or changes the update interval.
'''Function [[RegisterForSingleUpdate - Form|RegisterForSingleUpdate]](float afInterval)'''
*Function [[RegisterForUpdateGameTime - Form|RegisterForUpdateGameTime]](float afInterval)
*Registers this magic effect to receive a single update event in the specified time.
**Registers this magic effect to receive update events with the specified interval in game time hours, or changes the update interval.
 
*Function [[RemoveAllInventoryEventFilters - ObjectReference|RemoveAllInventoryEventFilters]]()
'''Function [[RegisterForSingleUpdateGameTime - Form|RegisterForSingleUpdateGameTime]](float afInterval)'''
**Remove all inventory event filters on this effect.
*Registers this magic effect to receive a single update event in the specified number of game hours.
*Function [[RemoveInventoryEventFilter - ObjectReference|RemoveInventoryEventFilter]](Form akFilter)
 
**Remove a specific inventory event filter.
'''Function [[RegisterForSleep - Form|RegisterForSleep]]()'''
*Function [[StartObjectProfiling - Form|StartObjectProfiling]]()
*Registers this magic effect to receive sleep events for when the player goes to sleep or wakes up.
**Starts profiling all scripts attached to this magic effect.
 
*Function [[StopObjectProfiling - Form|StopObjectProfiling]]()
'''Function [[RegisterForTrackedStatsEvent - Form|RegisterForTrackedStatsEvent]]()'''
**Stops profiling all scripts attached to this magic effect.
*Registers this magic effect to receive tracked stats events for when tracked stats are updated.
*Function [[UnregisterForAnimationEvent - Form|UnregisterForAnimationEvent]](ObjectReference akSender, string asEventName)
 
**Unregisters this magic effect 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 magic effect to receive update events with the specified interval, or changes the update interval.
**Unregisters this magic effect from any LOS events between the viewer and target.
 
*Function [[UnregisterForSleep - Form|UnregisterForSleep]]()
'''Function [[RegisterForUpdateGameTime - Form|RegisterForUpdateGameTime]](float afInterval)'''
**Unregisters this magic effect from sleep events.
*Registers this magic effect to receive update events with the specified interval in game time hours, or changes the update interval.
*Function [[UnregisterForTrackedStatsEvent - Form|UnregisterForTrackedStatsEvent]]()
 
**Unregisters this magic effect from tracked stats events.
'''Function [[RemoveAllInventoryEventFilters - ObjectReference|RemoveAllInventoryEventFilters]]()'''
*Function [[UnregisterForUpdate - Form|UnregisterForUpdate]]()
*Remove all inventory event filters on this effect.
**Unregisters this magic effect from update events.
 
*Function [[UnregisterForUpdateGameTime - Form|UnregisterForUpdateGameTime]]()
'''Function [[RemoveInventoryEventFilter - ObjectReference|RemoveInventoryEventFilter]](Form akFilter)'''
**Unregisters this magic effect from game time update events.
*Remove a specific inventory event filter.
 
'''Function [[StartObjectProfiling - Form|StartObjectProfiling]]()'''
*Starts profiling all scripts attached to this magic effect.
 
'''Function [[StopObjectProfiling - Form|StopObjectProfiling]]()'''
*Stops profiling all scripts attached to this magic effect.
 
'''Function [[UnregisterForAnimationEvent - Form|UnregisterForAnimationEvent]](ObjectReference akSender, string asEventName)'''
*Unregisters this magic effect from receiving the specified animation event from the specified object.
 
'''Function [[UnregisterForLOS - Form|UnregisterForLOS]](Actor akViewer, ObjectReference akTarget)'''
*Unregisters this magic effect from any LOS events between the viewer and target.
 
'''Function [[UnregisterForSleep - Form|UnregisterForSleep]]()'''
*Unregisters this magic effect from sleep events.
 
'''Function [[UnregisterForTrackedStatsEvent - Form|UnregisterForTrackedStatsEvent]]()'''
*Unregisters this magic effect from tracked stats events.
 
'''Function [[UnregisterForUpdate - Form|UnregisterForUpdate]]()'''
*Unregisters this magic effect from update events.
 
'''Function [[UnregisterForUpdateGameTime - Form|UnregisterForUpdateGameTime]]()'''
*Unregisters this magic effect from game time update events.


== Events ==
== Events ==

Revision as of 13:36, 20 February 2012


Extends: None

Script for the manipulation of active magic effects (MagicEffects currently attached to an Actor)

Definition

ScriptName ActiveMagicEffect

Properties

None

Global Functions

None

Member Functions

Function AddInventoryEventFilter(Form akFilter)

  • Adds an inventory event filter to this effect.

Function Dispel()

  • Dispels this active magic effect.

MagicEffect Function GetBaseObject()

  • Obtains the MagicEffect this active magic effect is based on.

Actor Function GetCasterActor()

  • Obtains the Actor that cast the spell this magic effect is from.

Actor Function GetTargetActor()

  • Obtains the Actor this active magic effect is applied to.

Function RegisterForAnimationEvent(ObjectReference akSender, string asEventName)

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

Function RegisterForLOS(Actor akViewer, ObjectReference akTarget)

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

Function RegisterForSingleLOSGain(Actor akViewer, ObjectReference akTarget)

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

Function RegisterForSingleLOSLost(Actor akViewer, ObjectReference akTarget)

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

Function RegisterForSingleUpdate(float afInterval)

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

Function RegisterForSingleUpdateGameTime(float afInterval)

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

Function RegisterForSleep()

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

Function RegisterForTrackedStatsEvent()

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

Function RegisterForUpdate(float afInterval)

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

Function RegisterForUpdateGameTime(float afInterval)

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

Function RemoveAllInventoryEventFilters()

  • Remove all inventory event filters on this effect.

Function RemoveInventoryEventFilter(Form akFilter)

  • Remove a specific inventory event filter.

Function StartObjectProfiling()

  • Starts profiling all scripts attached to this magic effect.

Function StopObjectProfiling()

  • Stops profiling all scripts attached to this magic effect.

Function UnregisterForAnimationEvent(ObjectReference akSender, string asEventName)

  • Unregisters this magic effect from receiving the specified animation event from the specified object.

Function UnregisterForLOS(Actor akViewer, ObjectReference akTarget)

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

Function UnregisterForSleep()

  • Unregisters this magic effect from sleep events.

Function UnregisterForTrackedStatsEvent()

  • Unregisters this magic effect from tracked stats events.

Function UnregisterForUpdate()

  • Unregisters this magic effect from update events.

Function UnregisterForUpdateGameTime()

  • Unregisters this magic effect from game time update events.

Events

  • Event OnAnimationEvent(ObjectReference akSource, string asEventName)
    • Received when one of animation events we are listening for is recieved.
  • 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 OnEffectStart(Actor akTarget, Actor akCaster)
    • Event received when this effect starts
  • Event OnEffectFinish(Actor akTarget, Actor akCaster)
    • Event received when this effect has finished
  • Event OnGainLOS(Actor akViewer, ObjectReference akTarget)
    • Received when the viewer goes from not seeing the target to seeing the target - if this magic effect is registered.
  • Event OnLostLOS(Actor akViewer, ObjectReference akTarget)
    • Received when the viewer goes from seeing the target to not seeing the target - if this magic effect is registered.
  • 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 magic effect is registered.
  • Event OnUpdateGameTime()
    • Received at periodic intervals of game time, if the magic effect is registered.

ActiveMagicEffects will also receive events from the Actor they are attached to.