Difference between revisions of "ObjectReference Script"

Jump to navigation Jump to search
174 bytes added ,  12:57, 20 February 2012
imported>Jog
imported>Jog
Line 401: Line 401:


== Events ==
== Events ==
*Event [[OnActivate - ObjectReference|OnActivate]](ObjectReference akActionRef)
'''Event [[OnActivate - ObjectReference|OnActivate]](ObjectReference akActionRef)'''
**Event received when this object is activated.
*Event received when this object is activated.
*Event [[OnAttachedToCell - ObjectReference|OnAttachedToCell]]()
 
**Event received when this reference moves from a detached cell to an attached one.
'''Event [[OnAttachedToCell - ObjectReference|OnAttachedToCell]]()'''
*Event [[OnCellAttach - ObjectReference|OnCellAttach]]()
*Event received when this reference moves from a detached cell to an attached one.
**Event received when this reference's parent cell attaches.
 
*Event [[OnCellDetach - ObjectReference|OnCellDetach]]()
'''Event [[OnCellAttach - ObjectReference|OnCellAttach]]()'''
**Event received when this reference's parent cell detaches.
*Event received when this reference's parent cell attaches.
*Event [[OnCellLoad - ObjectReference|OnCellLoad]]()
 
**Event received when everything in the cell that holds this reference has loaded.
'''Event [[OnCellDetach - ObjectReference|OnCellDetach]]()'''
*Event [[OnClose - ObjectReference|OnClose]](ObjectReference akActionRef)
*Event received when this reference's parent cell detaches.
**Event received when this object is finished closing.
 
*Event [[OnContainerChanged - ObjectReference|OnContainerChanged]](ObjectReference akNewContainer, ObjectReference akOldContainer)
'''Event [[OnCellLoad - ObjectReference|OnCellLoad]]()'''
**Event received when an object moves into/out of/between containers.
*Event received when everything in the cell that holds this reference has loaded.
*Event [[OnDestructionStageChanged - ObjectReference|OnDestructionStageChanged]](int aiOldStage, int aiCurrentStage)
 
**Event received when this object's destruction stage has worsened.
'''Event [[OnClose - ObjectReference|OnClose]](ObjectReference akActionRef)'''
*Event [[OnDetachedFromCell - ObjectReference|OnDetachedFromCell]]()
*Event received when this object is finished closing.
**Event received when this object moves from an attached cell to a detached cell.
 
*Event [[OnEquipped - ObjectReference|OnEquipped]](Actor akActor)
'''Event [[OnContainerChanged - ObjectReference|OnContainerChanged]](ObjectReference akNewContainer, ObjectReference akOldContainer)'''
**Event received when this object is equipped by an actor.
*Event received when an object moves into/out of/between containers.
*Event [[OnGrab - ObjectReference|OnGrab]]()
 
**Event received when this object is grabbed (z-keyed) by the player.
'''Event [[OnDestructionStageChanged - ObjectReference|OnDestructionStageChanged]](int aiOldStage, int aiCurrentStage)'''
*Event [[OnHit - ObjectReference|OnHit]](ObjectReference akAggressor, Form akSource, Projectile akProjectile, bool abPowerAttack, bool abSneakAttack, bool abBashAttack, bool abHitBlocked)
*Event received when this object's destruction stage has worsened.
**Event received when this object is hit with a weapon or projectile.
 
*Event [[OnItemAdded - ObjectReference|OnItemAdded]](Form akBaseItem, int aiItemCount, ObjectReference akItemReference, ObjectReference akSourceContainer)
'''Event [[OnDetachedFromCell - ObjectReference|OnDetachedFromCell]]()'''
**Event received when an item is inserted into this object's container.
*Event received when this object moves from an attached cell to a detached cell.
*Event [[OnItemRemoved - ObjectReference|OnItemRemoved]](Form akBaseItem, int aiItemCount, ObjectReference akItemReference, ObjectReference akDestContainer)
 
**Event received when an item is removed from this object's container.
'''Event [[OnEquipped - ObjectReference|OnEquipped]](Actor akActor)'''
*Event [[OnLoad - ObjectReference|OnLoad]]()
*Event received when this object is equipped by an actor.
**Event received when this object's 3d is loaded and ready.
 
*Event [[OnLockStateChanged - ObjectReference|OnLockStateChanged]]()
'''Event [[OnGrab - ObjectReference|OnGrab]]()'''
**Event received when the lock on this object changes its state.
*Event received when this object is grabbed (z-keyed) by the player.
*Event [[OnMagicEffectApply - ObjectReference|OnMagicEffectApply]](ObjectReference akCaster, MagicEffect akEffect)
 
**Event received when a magic effect is attempting to be applied to this reference.
'''Event [[OnHit - ObjectReference|OnHit]](ObjectReference akAggressor, Form akSource, Projectile akProjectile, bool abPowerAttack, bool abSneakAttack, bool abBashAttack, bool abHitBlocked)'''
*Event [[OnOpen - ObjectReference|OnOpen]](ObjectReference akActionRef)
*Event received when this object is hit with a weapon or projectile.
**Event received when this object is fully opened.
 
*Event [[OnRead - ObjectReference|OnRead]]()
'''Event [[OnItemAdded - ObjectReference|OnItemAdded]](Form akBaseItem, int aiItemCount, ObjectReference akItemReference, ObjectReference akSourceContainer)'''
**Event received when this object is read. (Only applies to books)
*Event received when an item is inserted into this object's container.
*Event [[OnRelease - ObjectReference|OnRelease]]()
 
**Event received when this object is released by the player (stopped z-keying).
'''Event [[OnItemRemoved - ObjectReference|OnItemRemoved]](Form akBaseItem, int aiItemCount, ObjectReference akItemReference, ObjectReference akDestContainer)'''
*Event [[OnReset - ObjectReference|OnReset]]()
*Event received when an item is removed from this object's container.
**Event received when this object is reset.
 
*Event [[OnSell - ObjectReference|OnSell]](Actor akSeller)
'''Event [[OnLoad - ObjectReference|OnLoad]]()'''
**Event received when this object is sold by someone.
*Event received when this object's 3d is loaded and ready.
*Event [[OnSpellCast - ObjectReference|OnSpellCast]](Form akSpell)
 
**Event received when this object casts a spell.
'''Event [[OnLockStateChanged - ObjectReference|OnLockStateChanged]]()'''
*Event [[OnTrapHit - ObjectReference|OnTrapHit]](ObjectReference akTarget, float afXVel, float afYVel, float afZVel, float afXPos, float afYPos, float afZPos, int aeMaterial, bool abInitialHit, int aeMotionType)
*Event received when the lock on this object changes its state.
**Event received when this trap object hits a target.
 
*Event [[OnTrapHitStart - ObjectReference|OnTrapHitStart]](ObjectReference akTarget, float afXVel, float afYVel, float afZVel, float afXPos, float afYPos, float afZPos, int aeMaterial, bool abInitialHit, int aeMotionType)
'''Event [[OnMagicEffectApply - ObjectReference|OnMagicEffectApply]](ObjectReference akCaster, MagicEffect akEffect)'''
**Event received when this trap object starts colliding with a target.
*Event received when a magic effect is attempting to be applied to this reference.
*Event [[OnTrapHitStop - ObjectReference|OnTrapHitStop]](ObjectReference akTarget)
 
**Event received when this trap object stops colliding with a target.
'''Event [[OnOpen - ObjectReference|OnOpen]](ObjectReference akActionRef)'''
*Event [[OnTranslationAlmostComplete - ObjectReference|OnTranslationAlmostComplete]]()
*Event received when this object is fully opened.
**Event received when a translation request is almost complete.
 
*Event [[OnTranslationComplete - ObjectReference|OnTranslationComplete]]()
'''Event [[OnRead - ObjectReference|OnRead]]()'''
**Event received when a translation request is complete.
*Event received when this object is read. (Only applies to books)
*Event [[OnTranslationFailed - ObjectReference|OnTranslationFailed]]()
 
**Event received when a translation request has failed.
'''Event [[OnRelease - ObjectReference|OnRelease]]()'''
*Event [[OnTrigger - ObjectReference|OnTrigger]](ObjectReference akActionRef)
*Event received when this object is released by the player (stopped z-keying).
**Event received when this object is triggered.
 
*Event [[OnTriggerEnter - ObjectReference|OnTriggerEnter]](ObjectReference akActionRef)
'''Event [[OnReset - ObjectReference|OnReset]]()'''
**Event received when this object's volume is entered.
*Event received when this object is reset.
*Event [[OnTriggerLeave - ObjectReference|OnTriggerLeave]](ObjectReference akActionRef)
 
**Event received when this object's volume is left.
'''Event [[OnSell - ObjectReference|OnSell]](Actor akSeller)'''
*Event [[OnUnequipped - ObjectReference|OnUnequipped]](Actor akActor)
*Event received when this object is sold by someone.
**Event received when this object is unequipped by an actor.
 
*Event [[OnUnload - ObjectReference|OnUnload]]()
'''Event [[OnSpellCast - ObjectReference|OnSpellCast]](Form akSpell)'''
**Event received when this object's 3d has been unloaded.
*Event received when this object casts a spell.
*Event [[OnWardHit - ObjectReference|OnWardHit]](ObjectReference akCaster, Spell akSpell, int aiStatus)
 
**Event called when the object reference is using a ward that is hit by a spell.
'''Event [[OnTrapHit - ObjectReference|OnTrapHit]](ObjectReference akTarget, float afXVel, float afYVel, float afZVel, float afXPos, float afYPos, float afZPos, int aeMaterial, bool abInitialHit, int aeMotionType)'''
*Event received when this trap object hits a target.
 
'''Event [[OnTrapHitStart - ObjectReference|OnTrapHitStart]](ObjectReference akTarget, float afXVel, float afYVel, float afZVel, float afXPos, float afYPos, float afZPos, int aeMaterial, bool abInitialHit, int aeMotionType)'''
*Event received when this trap object starts colliding with a target.
 
'''Event [[OnTrapHitStop - ObjectReference|OnTrapHitStop]](ObjectReference akTarget)'''
*Event received when this trap object stops colliding with a target.
 
'''Event [[OnTranslationAlmostComplete - ObjectReference|OnTranslationAlmostComplete]]()'''
*Event received when a translation request is almost complete.
 
'''Event [[OnTranslationComplete - ObjectReference|OnTranslationComplete]]()'''
*Event received when a translation request is complete.
 
'''Event [[OnTranslationFailed - ObjectReference|OnTranslationFailed]]()'''
*Event received when a translation request has failed.
 
'''Event [[OnTrigger - ObjectReference|OnTrigger]](ObjectReference akActionRef)'''
*Event received when this object is triggered.
 
'''Event [[OnTriggerEnter - ObjectReference|OnTriggerEnter]](ObjectReference akActionRef)'''
*Event received when this object's volume is entered.
 
'''Event [[OnTriggerLeave - ObjectReference|OnTriggerLeave]](ObjectReference akActionRef)'''
*Event received when this object's volume is left.
 
'''Event [[OnUnequipped - ObjectReference|OnUnequipped]](Actor akActor)'''
*Event received when this object is unequipped by an actor.
 
'''Event [[OnUnload - ObjectReference|OnUnload]]()'''
*Event received when this object's 3d has been unloaded.
 
'''Event [[OnWardHit - ObjectReference|OnWardHit]](ObjectReference akCaster, Spell akSpell, int aiStatus)'''
*Event called when the object reference is using a ward that is hit by a spell.
Anonymous user

Navigation menu