Difference between revisions of "ObjectReference Script"

From the CreationKit Wiki
Jump to navigation Jump to search
imported>Wafflesalot
(→‎SKSE Member Functions: minor descriptions for GetItemCharge,SetItemCharge and GetItemMaxCharge. also minor edit to SetItemCharge link.)
imported>CraftySentinel
m (Formatting Change)
Line 29: Line 29:
== Global Functions ==
== Global Functions ==
None
None
|}


== Member Functions ==
== Member Functions ==
'''Function [[Activate - ObjectReference|Activate]](ObjectReference akActivator)'''
*Have the passed in reference activate this object.
'''Function [[AddInventoryEventFilter - ObjectReference|AddInventoryEventFilter]](Form akFilter)'''
*Adds an inventory event filter to this reference.
'''Function [[AddItem - ObjectReference|AddItem]](Form akItemToAdd, int aiCount, bool abSilent)'''
*Adds the passed in item to this object's inventory.
'''Function [[AddKeyIfNeeded - ObjectReference|AddKeyIfNeeded]](ObjectReference ObjectWithNeededKey)'''
*Adds the key to ObjectWithNeededKey if this object's inventory does not contain it already.
'''Function [[AddToMap - ObjectReference|AddToMap]](bool abAllowFastTravel)'''
*Adds this map marker to the map, optionally making it available for fast travel.
'''Function [[ApplyHavokImpulse - ObjectReference|ApplyHavokImpulse]](float afX, float afY, float afZ, float afMagnitude)'''
*Apply a Havok impulse force to this object.
'''Function [[BlockActivation - ObjectReference|BlockActivation]](bool abBlocked)'''
*Blocks (or unblocks) normal activation processing for this reference.
'''int Function [[CalculateEncounterLevel - ObjectReference|CalculateEncounterLevel]](int aiDifficulty)'''
*Calculate this object's encounter level, using the specified difficulty.
'''bool Function [[CanFastTravelToMarker - ObjectReference|CanFastTravelToMarker]]()'''
*Can the player fast travel to this map marker?
'''Function [[ClearDestruction - ObjectReference|ClearDestruction]]()'''
*Clears all effects of destruction from this object.
'''int Function [[CountLinkedRefChain - ObjectReference|CountLinkedRefChain]](keyword apKeyword, int maxExpectedLinkedRefs)'''
*Counts the number of linked refs that are in a linked Ref chain
'''Function [[CreateDetectionEvent - ObjectReference|CreateDetectionEvent]](Actor akOwner, int aiSoundLevel)'''
*Create a detection event at this reference, with the specified owner.
'''Function [[DamageObject - ObjectReference|DamageObject]](float afDamage)'''
*Damages this object and advances the destruction stage.
'''Function [[Delete - ObjectReference|Delete]]()'''
*Deletes this object.
'''Function [[DeleteWhenAble - ObjectReference|DeleteWhenAble]]()'''
*Waits until this reference is out of the loaded area and then deletes it
'''Function [[Disable - ObjectReference|Disable]](bool abFadeOut)'''
*Disables this object.
'''Function [[DisableLinkChain - ObjectReference|DisableLinkChain]](Keyword apKeyword, bool abFadeOut)'''
*Disables all of the references that are linked, in a chain, to this one.
'''Function [[DisableNoWait - ObjectReference|DisableNoWait]](bool abFadeOut)'''
*Disables this object and does not wait for the object to be disable or faded out.
'''Function [[DropObject - ObjectReference|DropObject]](Form akObject, int aiCount)'''
*Drops the specified object from this object's inventory.
'''Function [[Enable - ObjectReference|Enable]](bool abFadeIn)'''
*Enables this object.
'''Function [[EnableFastTravel - ObjectReference|EnableFastTravel]](bool abEnable) native'''
*Enables or disables fast travel to this map marker.
'''Function [[EnableLinkChain - ObjectReference|EnableLinkChain]](Keyword apKeyword)'''
*Enables all of the references that are linked, in a chain, to this one.
'''Function [[EnableNoWait - ObjectReference|EnableNoWait]](bool abFadeIn)'''
*Enables this object and does not wait for the object to be enabled or faded in.
'''Function [[ForceAddRagdollToWorld - ObjectReference|ForceAddRagdollToWorld]]() native'''
*Forcibly adds the ragdoll of a reference to the world
'''Function [[ForceRemoveRagdollFromWorld - ObjectReference|ForceRemoveRagdollFromWorld]]() native'''
*Forcibly removes the ragdoll of a reference from the world
'''ActorBase Function [[GetActorOwner - ObjectReference|GetActorOwner]]()'''
*Obtains the actor base that owns this object.
'''float Function [[GetAngleX - ObjectReference|GetAngleX]]()'''
*Obtains this object's rotation around the x axis.
'''float Function [[GetAngleY - ObjectReference|GetAngleY]]()'''
*Obtains this object's rotation around the y axis.
'''float Function [[GetAngleZ - ObjectReference|GetAngleZ]]()'''
*Obtains this object's rotation around the z axis.
'''bool Function [[GetAnimationVariableBool - ObjectReference|GetAnimationVariableBool]](string asVariableName)'''
*Fetches the value of a variable on the reference's animation graph (bool version).
'''float Function [[GetAnimationVariableFloat - ObjectReference|GetAnimationVariableFloat]](string asVariableName)'''
*Fetches the value of a variable on the reference's animation graph (float version).
'''int Function [[GetAnimationVariableInt - ObjectReference|GetAnimationVariableInt]](string asVariableName)'''
*Fetches the value of a variable on the reference's animation graph (int version).
'''Form Function [[GetBaseObject - ObjectReference|GetBaseObject]]()'''
*Obtains this reference's base object.
'''int Function [[GetCurrentDestructionStage - ObjectReference|GetCurrentDestructionStage]]()'''
*Gets the object's current stage of destruction.
'''Location Function [[GetCurrentLocation - ObjectReference|GetCurrentLocation]]()'''
*Obtains this reference's current location.
'''Scene Function [[GetCurrentScene - ObjectReference|GetCurrentScene]]()'''
*Obtains the scene that this reference is currently participating in, if any.
'''float Function [[GetDistance - ObjectReference|GetDistance]](ObjectReference akOther)'''
*Calculates the distance between this object and the passed in one.
'''Location Function [[GetEditorLocation - ObjectReference|GetEditorLocation]]()'''
*Obtains this reference's editor location.
'''Faction Function [[GetFactionOwner - ObjectReference|GetFactionOwner]]()'''
*Gets the faction that owns this reference.
'''float Function [[GetHeadingAngle - ObjectReference|GetHeadingAngle]](ObjectReference akOther)'''
*Gets the angle between this object's heading, and the direction the other object is in.
'''float Function [[GetHeight - ObjectReference|GetHeight]]()'''
*Gets the height of this object
'''int Function [[GetItemCount - ObjectReference|GetItemCount]](Form akItem)'''
*Returns how many of the specified item is in this object's inventory.


'''float Function [[GetItemHealthPercent - ObjectReference|GetItemHealthPercent]]()'''
{|class="wikitable" width =100%
*Returns the item health percent of this object (1.0 == 100%).
!style="text-align:left;"|Function
!style="text-align:left;"|Description
|-
|[[Activate - ObjectReference|'''Activate'''(ObjectReference ''akActivator'')]]
|Have the passed in reference activate this object.
|-


'''Key Function [[GetKey - ObjectReference|GetKey]]()'''
|[[AddInventoryEventFilter - ObjectReference|'''AddInventoryEventFilter'''(Form ''akFilter'')]]
*Obtains the key that unlocks this object (if any).
|Adds an inventory event filter to this reference.
|-


'''float Function [[GetLength - ObjectReference|GetLength]]()'''
|[[AddItem - ObjectReference|'''AddItem'''(Form ''akItemToAdd'', Int ''aiCount'', Bool ''abSilent'')]]
*Obtains the length of this object.
|Adds the passed in item to this object's inventory.
|-


'''ObjectReference Function [[GetLinkedRef - ObjectReference|GetLinkedRef]](Keyword apKeyword)'''
|[[AddKeyIfNeeded - ObjectReference|'''AddKeyIfNeeded'''(ObjectReference ''ObjectWithNeededKey'')]]
*Returns our linked reference for the given Keyword, if any.
|Adds the key to ObjectWithNeededKey if this object's inventory does not contain it already.
|-


'''int Function [[GetLockLevel - ObjectReference|GetLockLevel]]()'''
|[[AddToMap - ObjectReference|'''AddToMap'''(Bool ''abAllowFastTravel'')]]
*Obtains the level of the lock on this object.
|Adds this map marker to the map, optionally making it available for fast travel.
|-


'''float Function [[GetMass - ObjectReference|GetMass]]()'''
|[[ApplyHavokImpulse - ObjectReference|'''ApplyHavokImpulse'''(Float ''afX'', Float ''afY'', Float ''afZ'', Float ''afMagnitude'')]]
*Obtains this object's mass in Havok.
|Apply a Havok impulse force to this object.
|-


'''ObjectReference Function [[GetNthLinkedRef - ObjectReference|GetNthLinkedRef]](int aiLinkedRef)'''
|[[BlockActivation - ObjectReference|'''BlockActivation'''(Bool ''abBlocked'')]]
*Obtains the nth linked ref from this object.
|Blocks normal activation processing for this reference.
|-


'''int Function [[GetOpenState - ObjectReference|GetOpenState]]()'''
|[[CalculateEncounterLevel - ObjectReference|Int '''CalculateEncounterLevel'''(Int ''aiDifficulty'')]]
*Obtains this object's current "open state".
|Calculate this object's encounter level, using the specified difficulty.
|-


'''Cell Function [[GetParentCell - ObjectReference|GetParentCell]]()'''
|[[CanFastTravelToMarker - ObjectReference|Bool '''CanFastTravelToMarker'''()]]
*Obtains the cell this object is currently in.
|Can the player fast travel to this map marker?
|-


'''float Function [[GetPositionX - ObjectReference|GetPositionX]]()'''
|[[ClearDestruction - ObjectReference|'''ClearDestruction'''()]]
*Returns this object's current X position.
|Clears all effects of destruction from this object.
|-


'''float Function [[GetPositionY - ObjectReference|GetPositionY]]()'''
|[[CountLinkedRefChain - ObjectReference|Int '''CountLinkedRefChain'''(Keyword ''apKeyword'', Int ''maxExpectedLinkedRefs'')]]
*Returns this object's current Y position.
|Counts the number of linked refs that are in a linked Ref chain
|-


'''float Function [[GetPositionZ - ObjectReference|GetPositionZ]]()'''
|[[CreateDetectionEvent - ObjectReference|'''CreateDetectionEvent'''(Actor ''akOwner'', Int ''aiSoundLevel'')]]
*Returns this object's current Z position.
|Create a detection event at this reference, with the specified owner.
|-


'''float Function [[GetScale - ObjectReference|GetScale]]()'''
|[[DamageObject - ObjectReference|'''DamageObject'''(Float ''afDamage'')]]
*Get this object's current scale.
|Damages this object and advances the destruction stage.
|-


'''int Function [[GetTriggerObjectCount - ObjectReference|GetTriggerObjectCount]]()'''
|[[Delete - ObjectReference|'''Delete'''()]]
*Returns the number of objects inside this trigger volume.
|Deletes this object.
|-


'''VoiceType function [[GetVoiceType - ObjectReference|GetVoiceType]]()'''
|[[DeleteWhenAble - ObjectReference|'''DeleteWhenAble'''()]]
*Obtains the [[VoiceType Script|VoiceType]] for this actor or talking activator.
|Waits until this reference is out of the loaded area and then deletes it
|-


'''float Function [[GetWidth - ObjectReference|GetWidth]]()'''
|[[Disable - ObjectReference|'''Disable'''(Bool ''abFadeOut'')]]
*Get the current width of the object.
|Disables this object.
|-


'''Worldspace Function [[GetWorldSpace - ObjectReference|GetWorldSpace]]()'''
|[[DisableLinkChain - ObjectReference|'''DisableLinkChain'''(Keyword ''apKeyword'', Bool ''abFadeOut'')]]
*Returns the worldspace this reference is in.
|Disables all of the references that are linked, in a chain, to this one.
|-


'''bool Function [[HasEffectKeyword - ObjectReference|HasEffectKeyword]](Keyword akKeyword)'''
|[[DisableNoWait - ObjectReference|'''DisableNoWait'''(Bool ''abFadeOut'')]]
*Returns if this reference has an active effect coming from a magic effect with the specified keyword attached
|Disables this object and does not wait for the object to be disable or faded out.
|-


'''bool Function [[HasNode - ObjectReference|HasNode]](string asNodeName)'''
|[[DropObject - ObjectReference|'''DropObject'''(Form ''akObject'', Int ''aiCount'')]]
*Returns if this reference has the specified name node in its 3D.
|Drops the specified object from this object's inventory.
|-


'''bool Function [[HasRefType - ObjectReference|HasRefType]](LocationRefType akRefType)'''
|[[Enable - ObjectReference|'''Enable'''(Bool ''abFadeIn'')]]
*Returns if this reference has the specified [[LocationRefType Script|LocationRefType]] attached.
|Enables this object.
|-


'''Function [[IgnoreFriendlyHits - ObjectReference|IgnoreFriendlyHits]](bool abIgnore)'''
|[[EnableFastTravel - ObjectReference|'''EnableFastTravel'''(Bool ''abEnable'')]]
*Flags this reference as ignoring (or not ignoring) friendly hits
|Enables or disables fast travel to this map marker.
|-


'''Function [[InterruptCast - ObjectReference|InterruptCast]]()'''
|[[EnableLinkChain - ObjectReference|'''EnableLinkChain'''(Keyword ''apKeyword'')]]
*Interrupts any spellcasting this object may be doing.
|Enables all of the references that are linked, in a chain, to this one.
|-


'''bool Function [[IsActivateChild - ObjectReference|IsActivateChild]](ObjectReference akChild)'''
|[[EnableNoWait - ObjectReference|'''EnableNoWait'''(Bool ''abFadeIn'')]]
*Returns whether the passed in reference is an activate child of this reference.
|Enables this object and does not wait for the object to be enabled or faded in.
|-


'''bool Function [[IsActivationBlocked - ObjectReference|IsActivationBlocked]]()'''
|[[ForceAddRagdollToWorld - ObjectReference|'''ForceAddRagdollToWorld'''()]]
*Returns whether normal activation processing is currently blocked on this reference or not.
|Forcibly adds the ragdoll of a reference to the world
|-


'''bool Function [[Is3DLoaded - ObjectReference|Is3DLoaded]]()'''
|[[ForceRemoveRagdollFromWorld - ObjectReference|'''ForceRemoveRagdollFromWorld'''()]]
*Checks to see if this reference's 3D data is currently loaded or not.
|Forcibly removes the ragdoll of a reference from the world
|-


'''bool Function [[IsDeleted - ObjectReference|IsDeleted]]()'''
|[[GetActorOwner - ObjectReference|ActorBase '''GetActorOwner'''()]]
*Checks to see if this object is currently flagged for delete.  
|Obtains the actor base that owns this object.
|-


'''bool Function [[IsDisabled - ObjectReference|IsDisabled]]()'''
|[[GetAngleX - ObjectReference|Float '''GetAngleX'''()]]
*Is this object currently disabled?
|Obtains this object's rotation around the x axis.
|-


'''bool Function [[IsEnabled - ObjectReference|IsEnabled]]()'''
|[[GetAngleY - ObjectReference|Float '''GetAngleY'''()]]
*Is this object currently enabled?
|Obtains this object's rotation around the y axis.
|-


'''bool Function [[IsFurnitureInUse - ObjectReference|IsFurnitureInUse]](bool abIgnoreReserved)'''
|[[GetAngleZ - ObjectReference|Float '''GetAngleZ'''()]]
*Is any furniture marker on this object in use?
|Obtains this object's rotation around the z axis.
|-


'''bool Function [[IsFurnitureMarkerInUse - ObjectReference|IsFurnitureMarkerInUse]](int aiMarker, bool abIgnoreReserved)'''
|[[GetAnimationVariableBool - ObjectReference|Bool '''GetAnimationVariableBool'''(String ''asVariableName'')]]
*Is the specified furniture marker on this object in use?
|Fetches the value of a variable on the reference's animation graph (bool version).
|-


'''bool Function [[IsIgnoringFriendlyHits - ObjectReference|IsIgnoringFriendlyHits]]()'''
|[[GetAnimationVariableFloat - ObjectReference|Float '''GetAnimationVariableFloat'''(String ''asVariableName'')]]
*Is this object ignoring friendly hits?
|Fetches the value of a variable on the reference's animation graph (float version).
|-


'''bool Function [[IsInDialogueWithPlayer - ObjectReference|IsInDialogueWithPlayer]]()'''
|[[GetAnimationVariableInt - ObjectReference|Int '''GetAnimationVariableInt'''(String ''asVariableName'')]]
*Is this actor or talking activator currently talking to the player?
|Fetches the value of a variable on the reference's animation graph (int version).
|-


'''bool Function [[IsInInterior - ObjectReference|IsInInterior ]] ()'''
|[[GetBaseObject - ObjectReference|Form '''GetBaseObject'''()]]
*Returns true if the object is in an interior cell.
|Obtains this reference's base object.
|-


'''bool Function [[IsInLocation - ObjectReference|IsInLocation]] (Location akLocation)'''
|[[GetCurrentDestructionStage - ObjectReference|Int '''GetCurrentDestructionStage'''()]]
*Returns true if the object is currently in that location or a child of that location.
|Gets the object's current stage of destruction.
|-


'''bool Function [[IsLocked - ObjectReference|IsLocked]]()'''
|[[GetCurrentLocation - ObjectReference|Location '''GetCurrentLocation'''()]]
*Is the lock on this object locked?
|Obtains this reference's current location.
|-


'''bool Function [[IsMapMarkerVisible - ObjectReference|IsMapMarkerVisible]]()'''
|[[GetCurrentScene - ObjectReference|Scene '''GetCurrentScene'''()]]
*Is this map marker visible to the player?
|Obtains the scene that this reference is currently participating in, if any.
|-


'''bool Function [[IsNearPlayer - ObjectReference|IsNearPlayer]]()'''
|[[GetDistance - ObjectReference|Float '''GetDistance'''(ObjectReference ''akOther'')]]
*A quick-and-dirty function to tell if this object is safe to enable or disable
|Calculates the distance between this object and the passed in one.
|-


'''Function [[KnockAreaEffect - ObjectReference|KnockAreaEffect]](float afMagnitude, float afRadius)'''
|[[GetEditorLocation - ObjectReference|Location '''GetEditorLocation'''()]]
*Executes a knock effect to an area
|Obtains this reference's editor location.
|-


'''Function [[Lock - ObjectReference|Lock]](bool abLock, bool abAsOwner)'''
|[[GetFactionOwner - ObjectReference|Faction '''GetFactionOwner'''()]]
*Locks or unlocks this object.
|Gets the faction that owns this reference.
|-


'''Function [[MoveTo - ObjectReference|MoveTo]](ObjectReference akTarget, float afXOffset, float afYOffset, float afZOffset, bool abMatchRotation)'''
|[[GetHeadingAngle - ObjectReference|Float '''GetHeadingAngle'''(ObjectReference ''akOther'')]]
*Moves this object to the same location as the passed-in reference, offset by the specified amount.
|Gets the angle between this object's heading, and the direction the other object is in.
|-


'''bool Function [[MoveToIfUnloaded - ObjectReference|MoveToIfUnloaded]](ObjectReference akTarget, float afXOffset, float afYOffset, float afZOffset)'''
|[[GetHeight - ObjectReference|Float '''GetHeight'''()]]
*Moves this object to the same location as the passed-in reference, offset by the specified amount, IF this object is not currently loaded.
|Gets the height of this object
|-


'''Function [[MoveToInteractionLocation - ObjectReference|MoveToInteractionLocation]](ObjectReference akTarget)'''
|[[GetItemCount - ObjectReference|Int '''GetItemCount'''(Form ''akItem'')]]
*Moves this object to the specified object's interaction location.
|Returns how many of the specified item is in this object's inventory.
|-


'''Function [[MoveToMyEditorLocation - ObjectReference|MoveToMyEditorLocation]]()'''
|[[GetItemHealthPercent - ObjectReference|Float '''GetItemHealthPercent'''()]]
*Moves this object to its own editor location.
|Returns the item health percent of this object (1.0 == 100%).
|-


'''Function [[MoveToNode - ObjectReference|MoveToNode]](ObjectReference akTarget, string asNodeName)'''
|[[GetKey - ObjectReference|Key '''GetKey'''()]]
*Moves this object to the position (and rotation) of the specified node on the specified object's 3D
|Obtains the key that unlocks this object (if any).
|-


'''Actor Function [[PlaceActorAtMe - ObjectReference|PlaceActorAtMe]](ActorBase akActorToPlace, int aiLevelMod, EncounterZone akZone)'''
|[[GetLength - ObjectReference|Float '''GetLength'''()]]
*Create an actor at this object's location.
|Obtains the length of this object.
|-


'''ObjectReference Function [[PlaceAtMe - ObjectReference|PlaceAtMe]](Form akFormToPlace, int aiCount)'''
|[[GetLinkedRef - ObjectReference|ObjectReference '''GetLinkedRef'''(Keyword ''apKeyword'')]]
*Places x copies of the passed in form at this object's current position, returning the last one created.
|Returns our linked reference for the given Keyword, if any.
|-


'''bool Function [[PlayAnimation - ObjectReference|PlayAnimation]](string asAnimation)'''
|[[GetLockLevel - ObjectReference|Int '''GetLockLevel'''()]]
*Plays the specified animation on this object, returning immediately.
|Obtains the level of the lock on this object.
|-


'''bool Function [[PlayAnimationAndWait - ObjectReference|PlayAnimationAndWait]](string asAnimation, string asEventName)'''
|[[GetMass - ObjectReference|Float '''GetMass'''()]]
*Plays the specified animation on this object and waits for the specified event before returning. (latent)
|Obtains this object's mass in Havok.
|-


'''bool Function [[PlayGamebryoAnimation - ObjectReference|PlayGamebryoAnimation]](string asAnimation, bool abStartOver, float afEaseInTime)'''
|[[GetNthLinkedRef - ObjectReference|ObjectReference '''GetNthLinkedRef'''(Int ''aiLinkedRef'')]]
*Plays a legacy nif file based animation
|Obtains the nth linked ref from this object.
|-


'''bool Function [[PlayImpactEffect - ObjectReference|PlayImpactEffect]] (ImpactDataSet akImpactEffect, string asNodeName, float afPickDirX, float afPickDirY, float afPickDirZ, float afPickLength, bool abApplyNodeRotation, bool abUseNodeLocalRotation)'''
|[[GetOpenState - ObjectReference|Int '''GetOpenState'''()]]
*Plays an impact effect.
|Obtains this object's current "open state".
|-


'''bool Function [[PlaySyncedAnimationAndWaitSS - ObjectReference|PlaySyncedAnimationAndWaitSS]](string asAnimation1, string asEvent1, ObjectReference akObj2, string asAnimation2, string asEvent2)'''
|[[GetParentCell - ObjectReference|Cell '''GetParentCell'''()]]
*Plays two animations simultaneously, waiting for events from both.
|Obtains the cell this object is currently in.
|-


'''bool Function [[PlaySyncedAnimationSS - ObjectReference|PlaySyncedAnimationSS]](string asAnimation1, ObjectReference akObj2, string asAnimation2)'''
|[[GetPositionX - ObjectReference|Float '''GetPositionX'''()]]
*Plays two animations simultaneously.
|Returns this object's current X position.
|-


'''Function [[PlayTerrainEffect - ObjectReference | PlayTerrainEffect]] (string asEffectModelName, string asAttachBoneName)'''
|[[GetPositionY - ObjectReference|Float '''GetPositionY'''()]]
*Plays a terrain effect.
|Returns this object's current Y position.
|-


'''Function [[ProcessTrapHit - ObjectReference|ProcessTrapHit]](ObjectReference akTrap, float afDamage, float afPushback, float afXVel, float afYVel, float afZVel, float afXPos, float afYPos, float afZPos, int aeMaterial, float afStagger)'''
|[[GetPositionZ - ObjectReference|Float '''GetPositionZ'''()]]
*Tells this object to handle the specified trap object hitting it.
|Returns this object's current Z position.
|-


'''Function [[PushActorAway - ObjectReference|PushActorAway]](Actor akActorToPush, int aiKnockbackDamage)'''
|[[GetScale - ObjectReference|Float '''GetScale'''()]]
*Pushes the other actor away from this object as if hit by the specified amount of knockback damage.
|Get this object's current scale.
|-


'''bool Function [[RampRumble - ObjectReference|RampRumble]](float power, float duration, float falloff)'''
|[[GetTriggerObjectCount - ObjectReference|Int '''GetTriggerObjectCount'''()]]
*Shakes cam/controller based on distance from player
|Returns the number of objects inside this trigger volume.
|-


'''Function [[RemoveAllInventoryEventFilters - ObjectReference|RemoveAllInventoryEventFilters]]()'''
|[[GetVoiceType - ObjectReference|VoiceType '''GetVoiceType'''()]]
*Remove all inventory event filters on this reference.
|Obtains the [[VoiceType Script|VoiceType]] for this actor or talking activator.
|-


'''Function [[RemoveAllItems - ObjectReference|RemoveAllItems]](ObjectReference akTransferTo, bool abKeepOwnership, bool abSilent)'''
|[[GetWidth - ObjectReference|Float '''GetWidth'''()]]
*Removes all items from this container, optionall transferring them to another one.
|Get the current width of the object.
|-


'''Function [[RemoveInventoryEventFilter - ObjectReference|RemoveInventoryEventFilter]](Form akFilter)'''
|[[GetWorldSpace - ObjectReference|Worldspace '''GetWorldSpace'''()]]
*Remove a specific inventory event filter.
|Returns the worldspace this reference is in.
|-


'''Function [[RemoveItem - ObjectReference|RemoveItem]](Form akItemToRemove, int aiCount, bool abSilent)'''
|[[HasEffectKeyword - ObjectReference|Bool '''HasEffectKeyword'''(Keyword ''akKeyword'')]]
*Removes the passed in item from this object's inventory.
|Returns if this reference has an active effect coming from a magic effect with the specified keyword attached
|-


'''Function [[Reset - ObjectReference|Reset]](ObjectReference akTarget)'''
|[[HasNode - ObjectReference|Bool '''HasNode'''(String ''asNodeName'')]]
*Resets this object reference, optionally placing the object at the new target.
|Returns if this reference has the specified name node in its 3D.
|-


'''Function [[Say - ObjectReference|Say]](Topic akTopicToSay, Actor akActorToSpeakAs, bool abSpeakInPlayersHead)'''
|[[HasRefType - ObjectReference|Bool '''HasRefType'''(LocationRefType ''akRefType'')]]
*Causes this reference to speak a topic as if it were the specified actor.
|Returns if this reference has the specified [[LocationRefType Script|LocationRefType]] attached.
|-


'''Function [[SendStealAlarm - ObjectReference|SendStealAlarm]](Actor akThief)'''
|[[IgnoreFriendlyHits - ObjectReference|'''IgnoreFriendlyHits'''(Bool ''abIgnore'')]]
*Sends a steal alarm as if this reference had just been stolen by the actor.
|Flags this reference as ignoring (or not ignoring) friendly hits
|-


'''Function [[SetActorCause - ObjectReference|SetActorCause]](Actor akActor)'''
|[[InterruptCast - ObjectReference|'''InterruptCast'''()]]
*Sets this actor as this object's actor cause.
|Interrupts any spellcasting this object may be doing.
|-


'''Function [[SetActorOwner - ObjectReference|SetActorOwner]](ActorBase akActorBase)'''
|[[IsActivateChild - ObjectReference|Bool '''IsActivateChild'''(ObjectReference ''akChild'')]]
*Sets this actor base as this object's owner.
|Returns whether the passed in reference is an activate child of this reference.
|-


'''Function [[SetAngle - ObjectReference|SetAngle]](float afXAngle, float afYAngle, float afZAngle)'''
|[[IsActivationBlocked - ObjectReference|Bool '''IsActivationBlocked'''()]]
*Sets this object's rotation. Angles are in degrees.
|Returns whether normal activation processing is currently blocked on this reference or not.
|-


'''Function [[SetAnimationVariableBool - ObjectReference|SetAnimationVariableBool]](string asVariableName, bool abNewValue)'''
|[[Is3DLoaded - ObjectReference|Bool '''Is3DLoaded'''()]]
*Sets the value of a variable on the reference's animation graph (bool version).
|Checks to see if this reference's 3D data is currently loaded or not.
|-


'''Function [[SetAnimationVariableFloat - ObjectReference|SetAnimationVariableFloat]](string asVariableName, float afNewValue)'''
|[[IsDeleted - ObjectReference|Bool '''IsDeleted'''()]]
*Sets the value of a variable on the reference's animation graph (float version).
|Checks to see if this object is currently flagged for delete.  
|-


'''Function [[SetAnimationVariableInt - ObjectReference|SetAnimationVariableInt]](string asVariableName, int aiNewValue)'''
|[[IsDisabled - ObjectReference|Bool '''IsDisabled'''()]]
*Sets the value of a variable on the reference's animation graph (int version).
|Is this object currently disabled?
|-


'''Function [[SetDestroyed - ObjectReference|SetDestroyed]](bool abDestroyed)'''
|[[IsEnabled - ObjectReference|Bool '''IsEnabled'''()]]
*Sets or clears this object's destroyed flag.
|Is this object currently enabled?
|-


'''Function [[SetFactionOwner - ObjectReference|SetFactionOwner]](Faction akFaction)'''
|[[IsFurnitureInUse - ObjectReference|Bool '''IsFurnitureInUse'''(Bool ''abIgnoreReserved'')]]
*Sets this faction as this object's owner.
|Is any furniture marker on this object in use?
|-


'''Function [[SetLockLevel - ObjectReference|SetLockLevel]](int aiLockLevel)'''
|[[IsFurnitureMarkerInUse - ObjectReference|Bool '''IsFurnitureMarkerInUse'''(Int ''aiMarker'', Bool ''abIgnoreReserved'')]]
*Sets the lock level on this object.
|Is the specified furniture marker on this object in use?
|-


'''Function [[SetMotionType - ObjectReference|SetMotionType]](int aiMotionType, bool abAllowActivate)'''
|[[IsIgnoringFriendlyHits - ObjectReference|Bool '''IsIgnoringFriendlyHits'''()]]
*Sets the havok motion type on this object.
|Is this object ignoring friendly hits?
|-


'''Function [[SetNoFavorAllowed - ObjectReference|SetNoFavorAllowed]](bool abNoFavor)'''
|[[IsInDialogueWithPlayer - ObjectReference|Bool '''IsInDialogueWithPlayer'''()]]
*Sets or clears this object's ability to be not used by a teammate for a favor
|Is this actor or talking activator currently talking to the player?
|-


'''Function [[SetOpen - ObjectReference|SetOpen]](bool abOpen)'''
|[[IsInInterior - ObjectReference|Bool '''IsInInterior'''()]]
*Opens or closes this object.
|Returns true if the object is in an interior cell.
|-


'''Function [[SetPosition - ObjectReference|SetPosition]](float afX, float afY, float afZ)'''
|[[IsInLocation - ObjectReference|Bool '''IsInLocation'''(Location ''akLocation'')]]
*Sets this object's position.
|Returns true if the object is currently in that location or a child of that location.
|-


'''Function [[SetScale - ObjectReference|SetScale]](float afScale)'''
|[[IsLocked - ObjectReference|Bool '''IsLocked'''()]]
*Set the current scale of the object
|Is the lock on this object locked?
|-


'''Function [[SplineTranslateTo - ObjectReference|SplineTranslateTo]](float afX, float afY, float afZ, float afAngleX, float afAngleY, float afAngleZ, float afSplineCurve, float afSpeed)'''
|[[IsMapMarkerVisible - ObjectReference|Bool '''IsMapMarkerVisible'''()]]
*Makes the object translate to the given pos/orient on a spline.
|Is this map marker visible to the player?
|-


'''Function [[SplineTranslateToRef - ObjectReference|SplineTranslateToRef]](ObjectReference arTarget, float afTangentMagnitude, float afSpeed, float afMaxRotationSpeed)'''
|[[IsNearPlayer - ObjectReference|Bool '''IsNearPlayer'''()]]
*Makes the reference translate to the target ref position/orient on a spline at the given speed
|A quick-and-dirty function to tell if this object is safe to enable or disable
|-


'''Function [[SplineTranslateToRefNode - ObjectReference|SplineTranslateToRefNode]](ObjectReference arTarget, string arNodeName, float afTangentMagnitude, float afSpeed, float afMaxRotationSpeed)'''
|[[KnockAreaEffect - ObjectReference|'''KnockAreaEffect'''(Float ''afMagnitude'', Float ''afRadius'')]]
*Makes the reference translate to the target node's position/orient on a spline at the given speed
|Executes a knock effect to an area
|-


'''Function [[StopTranslation - ObjectReference|StopTranslation]]()'''
|[[Lock - ObjectReference|'''Lock'''(Bool ''abLock'', Bool ''abAsOwner'')]]
*Stops any translation on the object.
|Locks or unlocks this object.
|-


'''Function [[TetherToHorse - ObjectReference|TetherToHorse]](ObjectReference akHorse)'''
|[[MoveTo - ObjectReference|'''MoveTo'''(ObjectReference ''akTarget'', Float ''afXOffset'', Float ''afYOffset'', Float ''afZOffset'', Bool ''abMatchRotation'')]]
*Tether a prisoner cart to the given horse.
|Moves this object to the same location as the passed-in reference, offset by the specified amount.
|-


'''Function [[TranslateTo - ObjectReference|TranslateTo]](float afX, float afY, float afZ, float afAngleX, float afAngleY, float afAngleZ, float afSpeed, float afMaxRotationSpeed)'''
|[[MoveToIfUnloaded - ObjectReference|Bool '''MoveToIfUnloaded'''(ObjectReference ''akTarget'', Float ''afXOffset'', Float ''afYOffset'', Float ''afZOffset'')]]
*Makes the object translate to the given pos/orient.
|Moves this object to the same location as the passed-in reference, offset by the specified amount, IF this object is not currently loaded.
|-


'''Function [[TranslateToRef - ObjectReference|TranslateToRef]](ObjectReference arTarget, float afSpeed, float afMaxRotationSpeed)'''
|[[MoveToInteractionLocation - ObjectReference|'''MoveToInteractionLocation'''(ObjectReference ''akTarget'')]]
*Makes the reference translate to the target ref position/orient at the given speed
|Moves this object to the specified object's interaction location.
|-


'''bool Function [[WaitForAnimationEvent - ObjectReference|WaitForAnimationEvent]](string asEventName)'''
|[[MoveToMyEditorLocation - ObjectReference|'''MoveToMyEditorLocation'''()]]
*Waits for the animation graph to send the specified event.
|Moves this object to its own editor location.
|-


== SKSE Member Functions ==
|[[MoveToNode - ObjectReference|'''MoveToNode'''(ObjectReference ''akTarget'', String ''asNodeName'')]]
'''int Function [[GetNumItems - ObjectReference|GetNumItems]]()'''
|Moves this object to the position (and rotation) of the specified node on the specified object's 3D
* (Container only) Returns the number of forms in the container.
|-


'''Form Function [[GetNthForm - ObjectReference|GetNthForm]](int index)'''
|[[PlaceActorAtMe - ObjectReference|Actor '''PlaceActorAtMe'''(ActorBase ''akActorToPlace'', Int ''aiLevelMod'', EncounterZone ''akZone'')]]
* (Container only) Returns the specified form from the container.
|Create an actor at this object's location.
|-


'''float Function [[GetTotalItemWeight - ObjectReference|GetTotalItemWeight]]()'''
|[[PlaceAtMe - ObjectReference|ObjectReference '''PlaceAtMe'''(Form ''akFormToPlace'', Int ''aiCount'')]]
* (Container only - perhaps Player only) Returns the total weight of all items held in the container.
|Places x copies of the passed in form at this object's current position, returning the last one created.
|-


'''float Function [[GetTotalArmorWeight - ObjectReference|GetTotalArmorWeight]]()'''
|[[PlayAnimation - ObjectReference|Bool '''PlayAnimation'''(String ''asAnimation'')]]
* (Container only - perhaps Player only) Returns the total weight of the armor in the container.
|Plays the specified animation on this object, returning immediately.
|-


'''bool Function [[IsHarvested - ObjectReference|IsHarvested]]()'''
|[[PlayAnimationAndWait - ObjectReference|Bool '''PlayAnimationAndWait'''(String ''asAnimation'', String ''asEventName'')]]
* (Flora and Tree only) Returns whether the flora has been harvested or not.
|Plays the specified animation on this object and waits for the specified event before returning. (latent)
|-


'''Function [[SetItemHealthPercent - ObjectReference|SetItemHealthPercent]](float health)'''
|[[PlayGamebryoAnimation - ObjectReference|Bool '''PlayGamebryoAnimation'''(String ''asAnimation'', Bool ''abStartOver'', Float ''afEaseInTime'')]]
* Set the item's tempering. 1.0 is no tempering, 1.6 appears to be legendary. Values below 1.0 do nothing.
|Plays a legacy nif file based animation
|-


'''float Function [[GetItemMaxCharge - ObjectReference|GetItemMaxCharge]]()'''
|[[PlayImpactEffect - ObjectReference|Bool '''PlayImpactEffect'''(ImpactDataSet ''akImpactEffect'', String ''asNodeName'', Float ''afPickDirX'', Float ''afPickDirY'', Float ''afPickDirZ'', Float ''afPickLength'', Bool ''abApplyNodeRotation'', Bool ''abUseNodeLocalRotation'')]]
* Gets the maximum charge of the item.
|Plays an impact effect.
|-


'''float Function [[GetItemCharge - ObjectReference|GetItemCharge]]()'''
|[[PlaySyncedAnimationAndWaitSS - ObjectReference|Bool '''PlaySyncedAnimationAndWaitSS'''(String ''asAnimation1'', String ''asEvent1'', ObjectReference ''akObj2'', String ''asAnimation2'', String ''asEvent2'')]]
* Gets the current charge of the item.
|Plays two animations simultaneously, waiting for events from both.
'''Function [[SetItemCharge - ObjectReference|SetItemCharge]](float charge)'''
|-
*Sets the item's charge to the specified amount.


== Events ==
|[[PlaySyncedAnimationSS - ObjectReference|Bool '''PlaySyncedAnimationSS'''(String ''asAnimation1'', ObjectReference ''akObj2'', String ''asAnimation2'')]]
'''Event [[OnActivate - ObjectReference|OnActivate]](ObjectReference akActionRef)'''
|Plays two animations simultaneously.
*Event received when this object is activated.
|-


'''Event [[OnAttachedToCell - ObjectReference|OnAttachedToCell]]()'''
|[[PlayTerrainEffect - ObjectReference |'''PlayTerrainEffect'''(String ''asEffectModelName'', String ''asAttachBoneName'')]]
*Event received when this reference moves from a detached cell to an attached one.
|Plays a terrain effect.
|-


'''Event [[OnCellAttach - ObjectReference|OnCellAttach]]()'''
|[[ProcessTrapHit - ObjectReference|'''ProcessTrapHit'''(ObjectReference ''akTrap'', Float ''afDamage'', Float ''afPushback'', Float ''afXVel'', Float ''afYVel'', Float ''afZVel'', Float ''afXPos'', Float ''afYPos'', Float ''afZPos'', Int ''aeMaterial'', Float ''afStagger'')]]
*Event received when this reference's parent cell attaches.
|Tells this object to handle the specified trap object hitting it.
|-


'''Event [[OnCellDetach - ObjectReference|OnCellDetach]]()'''
|[[PushActorAway - ObjectReference|'''PushActorAway'''(Actor ''akActorToPush'', Int ''aiKnockbackDamage'')]]
*Event received when this reference's parent cell detaches.
|Pushes the other actor away from this object as if hit by the specified amount of knockback damage.
|-


'''Event [[OnCellLoad - ObjectReference|OnCellLoad]]()'''
|[[RampRumble - ObjectReference|Bool '''RampRumble'''(Float ''power'', Float ''duration'', Float ''falloff'')]]
*Event received when everything in the cell that holds this reference has loaded.
|Shakes cam/controller based on distance from player
|-


'''Event [[OnClose - ObjectReference|OnClose]](ObjectReference akActionRef)'''
|[[RemoveAllInventoryEventFilters - ObjectReference|'''RemoveAllInventoryEventFilters'''()]]
*Event received when this object is finished closing.
|Remove all inventory event filters on this reference.
|-


'''Event [[OnContainerChanged - ObjectReference|OnContainerChanged]](ObjectReference akNewContainer, ObjectReference akOldContainer)'''
|[[RemoveAllItems - ObjectReference|'''RemoveAllItems'''(ObjectReference ''akTransferTo'', Bool ''abKeepOwnership'', Bool ''abSilent'')]]
*Event received when an object moves into/out of/between containers.
|Removes all items from this container, optionall transferring them to another one.
|-


'''Event [[OnDestructionStageChanged - ObjectReference|OnDestructionStageChanged]](int aiOldStage, int aiCurrentStage)'''
|[[RemoveInventoryEventFilter - ObjectReference|'''RemoveInventoryEventFilter'''(Form ''akFilter'')]]
*Event received when this object's destruction stage has worsened.
|Remove a specific inventory event filter.
|-


'''Event [[OnDetachedFromCell - ObjectReference|OnDetachedFromCell]]()'''
|[[RemoveItem - ObjectReference|'''RemoveItem'''(Form ''akItemToRemove'', Int ''aiCount'', Bool ''abSilent'')]]
*Event received when this object moves from an attached cell to a detached cell.
|Removes the passed in item from this object's inventory.
|-


'''Event [[OnEquipped - ObjectReference|OnEquipped]](Actor akActor)'''
|[[Reset - ObjectReference|'''Reset'''(ObjectReference ''akTarget'')]]
*Event received when this object is equipped by an actor.
|Resets this object reference, optionally placing the object at the new target.
|-


'''Event [[OnGrab - ObjectReference|OnGrab]]()'''
|[[Say - ObjectReference|'''Say'''(Topic ''akTopicToSay'', Actor ''akActorToSpeakAs'', Bool ''abSpeakInPlayersHead'')]]
*Event received when this object is grabbed (z-keyed) by the player.
|Causes this reference to speak a topic as if it were the specified actor.
|-


'''Event [[OnHit - ObjectReference|OnHit]](ObjectReference akAggressor, Form akSource, Projectile akProjectile, bool abPowerAttack, bool abSneakAttack, bool abBashAttack, bool abHitBlocked)'''
|[[SendStealAlarm - ObjectReference|'''SendStealAlarm'''(Actor ''akThief'')]]
*Event received when this object is hit with a weapon or projectile.
|Sends a steal alarm as if this reference had just been stolen by the actor.
|-


'''Event [[OnItemAdded - ObjectReference|OnItemAdded]](Form akBaseItem, int aiItemCount, ObjectReference akItemReference, ObjectReference akSourceContainer)'''
|[[SetActorCause - ObjectReference|'''SetActorCause'''(Actor ''akActor'')]]
*Event received when an item is inserted into this object's container.
|Sets this actor as this object's actor cause.
|-


'''Event [[OnItemRemoved - ObjectReference|OnItemRemoved]](Form akBaseItem, int aiItemCount, ObjectReference akItemReference, ObjectReference akDestContainer)'''
|[[SetActorOwner - ObjectReference|'''SetActorOwner'''(ActorBase ''akActorBase'')]]
*Event received when an item is removed from this object's container.
|Sets this actor base as this object's owner.
|-


'''Event [[OnLoad - ObjectReference|OnLoad]]()'''
|[[SetAngle - ObjectReference|'''SetAngle'''(Float ''afXAngle'', Float ''afYAngle'', Float ''afZAngle'')]]
*Event received when this object's 3d is loaded and ready.
|Sets this object's rotation. Angles are in degrees.
|-


'''Event [[OnLockStateChanged - ObjectReference|OnLockStateChanged]]()'''
|[[SetAnimationVariableBool - ObjectReference|'''SetAnimationVariableBool'''(String ''asVariableName'', Bool ''abNewValue'')]]
*Event received when the lock on this object changes its state.
|Sets the value of a variable on the reference's animation graph (bool version).
|-


'''Event [[OnMagicEffectApply - ObjectReference|OnMagicEffectApply]](ObjectReference akCaster, MagicEffect akEffect)'''
|[[SetAnimationVariableFloat - ObjectReference|'''SetAnimationVariableFloat'''(String ''asVariableName'', Float ''afNewValue'')]]
*Event received when a magic effect is attempting to be applied to this reference.
|Sets the value of a variable on the reference's animation graph (float version).
|-


'''Event [[OnOpen - ObjectReference|OnOpen]](ObjectReference akActionRef)'''
|[[SetAnimationVariableInt - ObjectReference|'''SetAnimationVariableInt'''(String ''asVariableName'', Int ''aiNewValue'')]]
*Event received when this object is fully opened.
|Sets the value of a variable on the reference's animation graph (int version).
|-


'''Event [[OnRead - ObjectReference|OnRead]]()'''
|[[SetDestroyed - ObjectReference|'''SetDestroyed'''(Bool ''abDestroyed'')]]
*Event received when this object is read. (Only applies to books)
|Sets or clears this object's destroyed flag.
|-


'''Event [[OnRelease - ObjectReference|OnRelease]]()'''
|[[SetFactionOwner - ObjectReference|'''SetFactionOwner'''(Faction ''akFaction'')]]
*Event received when this object is released by the player (stopped z-keying).
|Sets this faction as this object's owner.
|-


'''Event [[OnReset - ObjectReference|OnReset]]()'''
|[[SetLockLevel - ObjectReference|'''SetLockLevel'''(Int ''aiLockLevel'')]]
*Event received when this object is reset.
|Sets the lock level on this object.
|-


'''Event [[OnSell - ObjectReference|OnSell]](Actor akSeller)'''
|[[SetMotionType - ObjectReference|'''SetMotionType'''(Int ''aiMotionType'', Bool ''abAllowActivate'')]]
*Event received when this object is sold by someone.
|Sets the havok motion type on this object.
|-


'''Event [[OnSpellCast - ObjectReference|OnSpellCast]](Form akSpell)'''
|[[SetNoFavorAllowed - ObjectReference|'''SetNoFavorAllowed'''(Bool ''abNoFavor'')]]
*Event received when this object casts a spell.
|Sets or clears this object's ability to be not used by a teammate for a favor
|-


'''Event [[OnTrapHit - ObjectReference|OnTrapHit]](ObjectReference akTarget, float afXVel, float afYVel, float afZVel, float afXPos, float afYPos, float afZPos, int aeMaterial, bool abInitialHit, int aeMotionType)'''
|[[SetOpen - ObjectReference|'''SetOpen'''(Bool ''abOpen'')]]
*Event received when this trap object hits a target.
|Opens or closes this object.
|-


'''Event [[OnTrapHitStart - ObjectReference|OnTrapHitStart]](ObjectReference akTarget, float afXVel, float afYVel, float afZVel, float afXPos, float afYPos, float afZPos, int aeMaterial, bool abInitialHit, int aeMotionType)'''
|[[SetPosition - ObjectReference|'''SetPosition'''(Float ''afX'', Float ''afY'', Float ''afZ'')]]
*Event received when this trap object starts colliding with a target.
|Sets this object's position.
|-


'''Event [[OnTrapHitStop - ObjectReference|OnTrapHitStop]](ObjectReference akTarget)'''
|[[SetScale - ObjectReference|'''SetScale'''(Float ''afScale'')]]
*Event received when this trap object stops colliding with a target.
|Set the current scale of the object
|-


'''Event [[OnTranslationAlmostComplete - ObjectReference|OnTranslationAlmostComplete]]()'''
|[[SplineTranslateTo - ObjectReference|'''SplineTranslateTo'''(Float ''afX'', Float ''afY'', Float ''afZ'', Float ''afAngleX'', Float ''afAngleY'', Float ''afAngleZ'', Float ''afSplineCurve'', Float ''afSpeed'')]]
*Event received when a translation request is almost complete.
|Makes the object translate to the given pos/orient on a spline.
|-


'''Event [[OnTranslationComplete - ObjectReference|OnTranslationComplete]]()'''
|[[SplineTranslateToRef - ObjectReference|'''SplineTranslateToRef'''(ObjectReference ''arTarget'', Float ''afTangentMagnitude'', Float ''afSpeed'', Float ''afMaxRotationSpeed'')]]
*Event received when a translation request is complete.
|Makes the reference translate to the target ref position/orient on a spline at the given speed
|-


'''Event [[OnTranslationFailed - ObjectReference|OnTranslationFailed]]()'''
|[[SplineTranslateToRefNode - ObjectReference|'''SplineTranslateToRefNode'''(ObjectReference ''arTarget'', String ''arNodeName'', Float ''afTangentMagnitude'', Float ''afSpeed'', Float ''afMaxRotationSpeed'')]]
*Event received when a translation request has failed.
|Makes the reference translate to the target node's position/orient on a spline at the given speed
|-


'''Event [[OnTrigger - ObjectReference|OnTrigger]](ObjectReference akActionRef)'''
|[[StopTranslation - ObjectReference|'''StopTranslation'''()]]
*Event received when this object is triggered.
|Stops any translation on the object.
|-


'''Event [[OnTriggerEnter - ObjectReference|OnTriggerEnter]](ObjectReference akActionRef)'''
|[[TetherToHorse - ObjectReference|'''TetherToHorse'''(ObjectReference ''akHorse'')]]
*Event received when this object's volume is entered.
|Tether a prisoner cart to the given horse.
|-


'''Event [[OnTriggerLeave - ObjectReference|OnTriggerLeave]](ObjectReference akActionRef)'''
|[[TranslateTo - ObjectReference|'''TranslateTo'''(Float ''afX'', Float ''afY'', Float ''afZ'', Float ''afAngleX'', Float ''afAngleY'', Float ''afAngleZ'', Float ''afSpeed'', Float ''afMaxRotationSpeed'')]]
*Event received when this object's volume is left.
|Makes the object translate to the given pos/orient.
|-


'''Event [[OnUnequipped - ObjectReference|OnUnequipped]](Actor akActor)'''
|[[TranslateToRef - ObjectReference|'''TranslateToRef'''(ObjectReference ''arTarget'', Float ''afSpeed'', Float ''afMaxRotationSpeed'')]]
*Event received when this object is unequipped by an actor.
|Makes the reference translate to the target ref position/orient at the given speed
|-


'''Event [[OnUnload - ObjectReference|OnUnload]]()'''
|[[WaitForAnimationEvent - ObjectReference|Bool '''WaitForAnimationEvent'''(String ''asEventName'')]]
*Event received when this object's 3d has been unloaded.
|Waits for the animation graph to send the specified event.
|-


'''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.

Revision as of 04:30, 24 October 2013


Extends: Form Script

Script for the manipulation of object instances.
If you are adding a script to an object that is going to be a reference in the world (like a button for example) your script will need to extend this script.

Definition

ScriptName ObjectReference extends Form

Properties

  • float X [read-only]: The current X position of the reference.
  • float Y [read-only]: The current Y position of the reference.
  • float Z [read-only]: The current Z position of the reference.

These properties are meant to be used when calling SetMotionType:

  • int Motion_Dynamic [read-only]: 1
  • int Motion_SphereInertia [read-only]: 2
  • int Motion_BoxInertia [read-only]: 3
  • int Motion_Keyframed [read-only]: 4
  • int Motion_Fixed [read-only]: 5
  • int Motion_ThinBoxInertia [read-only]: 6
  • int Motion_Character [read-only]: 7

Global Functions

None

|}

Member Functions

Function Description
Activate(ObjectReference akActivator) Have the passed in reference activate this object.
AddInventoryEventFilter(Form akFilter) Adds an inventory event filter to this reference.
AddItem(Form akItemToAdd, Int aiCount, Bool abSilent) Adds the passed in item to this object's inventory.
AddKeyIfNeeded(ObjectReference ObjectWithNeededKey) Adds the key to ObjectWithNeededKey if this object's inventory does not contain it already.
AddToMap(Bool abAllowFastTravel) Adds this map marker to the map, optionally making it available for fast travel.
ApplyHavokImpulse(Float afX, Float afY, Float afZ, Float afMagnitude) Apply a Havok impulse force to this object.
BlockActivation(Bool abBlocked) Blocks normal activation processing for this reference.
Int CalculateEncounterLevel(Int aiDifficulty) Calculate this object's encounter level, using the specified difficulty.
Bool CanFastTravelToMarker() Can the player fast travel to this map marker?
ClearDestruction() Clears all effects of destruction from this object.
Int CountLinkedRefChain(Keyword apKeyword, Int maxExpectedLinkedRefs) Counts the number of linked refs that are in a linked Ref chain
CreateDetectionEvent(Actor akOwner, Int aiSoundLevel) Create a detection event at this reference, with the specified owner.
DamageObject(Float afDamage) Damages this object and advances the destruction stage.
Delete() Deletes this object.
DeleteWhenAble() Waits until this reference is out of the loaded area and then deletes it
Disable(Bool abFadeOut) Disables this object.
DisableLinkChain(Keyword apKeyword, Bool abFadeOut) Disables all of the references that are linked, in a chain, to this one.
DisableNoWait(Bool abFadeOut) Disables this object and does not wait for the object to be disable or faded out.
DropObject(Form akObject, Int aiCount) Drops the specified object from this object's inventory.
Enable(Bool abFadeIn) Enables this object.
EnableFastTravel(Bool abEnable) Enables or disables fast travel to this map marker.
EnableLinkChain(Keyword apKeyword) Enables all of the references that are linked, in a chain, to this one.
EnableNoWait(Bool abFadeIn) Enables this object and does not wait for the object to be enabled or faded in.
ForceAddRagdollToWorld() Forcibly adds the ragdoll of a reference to the world
ForceRemoveRagdollFromWorld() Forcibly removes the ragdoll of a reference from the world
ActorBase GetActorOwner() Obtains the actor base that owns this object.
Float GetAngleX() Obtains this object's rotation around the x axis.
Float GetAngleY() Obtains this object's rotation around the y axis.
Float GetAngleZ() Obtains this object's rotation around the z axis.
Bool GetAnimationVariableBool(String asVariableName) Fetches the value of a variable on the reference's animation graph (bool version).
Float GetAnimationVariableFloat(String asVariableName) Fetches the value of a variable on the reference's animation graph (float version).
Int GetAnimationVariableInt(String asVariableName) Fetches the value of a variable on the reference's animation graph (int version).
Form GetBaseObject() Obtains this reference's base object.
Int GetCurrentDestructionStage() Gets the object's current stage of destruction.
Location GetCurrentLocation() Obtains this reference's current location.
Scene GetCurrentScene() Obtains the scene that this reference is currently participating in, if any.
Float GetDistance(ObjectReference akOther) Calculates the distance between this object and the passed in one.
Location GetEditorLocation() Obtains this reference's editor location.
Faction GetFactionOwner() Gets the faction that owns this reference.
Float GetHeadingAngle(ObjectReference akOther) Gets the angle between this object's heading, and the direction the other object is in.
Float GetHeight() Gets the height of this object
Int GetItemCount(Form akItem) Returns how many of the specified item is in this object's inventory.
Float GetItemHealthPercent() Returns the item health percent of this object (1.0 == 100%).
Key GetKey() Obtains the key that unlocks this object (if any).
Float GetLength() Obtains the length of this object.
ObjectReference GetLinkedRef(Keyword apKeyword) Returns our linked reference for the given Keyword, if any.
Int GetLockLevel() Obtains the level of the lock on this object.
Float GetMass() Obtains this object's mass in Havok.
ObjectReference GetNthLinkedRef(Int aiLinkedRef) Obtains the nth linked ref from this object.
Int GetOpenState() Obtains this object's current "open state".
Cell GetParentCell() Obtains the cell this object is currently in.
Float GetPositionX() Returns this object's current X position.
Float GetPositionY() Returns this object's current Y position.
Float GetPositionZ() Returns this object's current Z position.
Float GetScale() Get this object's current scale.
Int GetTriggerObjectCount() Returns the number of objects inside this trigger volume.
VoiceType GetVoiceType() Obtains the VoiceType for this actor or talking activator.
Float GetWidth() Get the current width of the object.
Worldspace GetWorldSpace() Returns the worldspace this reference is in.
Bool HasEffectKeyword(Keyword akKeyword) Returns if this reference has an active effect coming from a magic effect with the specified keyword attached
Bool HasNode(String asNodeName) Returns if this reference has the specified name node in its 3D.
Bool HasRefType(LocationRefType akRefType) Returns if this reference has the specified LocationRefType attached.
IgnoreFriendlyHits(Bool abIgnore) Flags this reference as ignoring (or not ignoring) friendly hits
InterruptCast() Interrupts any spellcasting this object may be doing.
Bool IsActivateChild(ObjectReference akChild) Returns whether the passed in reference is an activate child of this reference.
Bool IsActivationBlocked() Returns whether normal activation processing is currently blocked on this reference or not.
Bool Is3DLoaded() Checks to see if this reference's 3D data is currently loaded or not.
Bool IsDeleted() Checks to see if this object is currently flagged for delete.
Bool IsDisabled() Is this object currently disabled?
Bool IsEnabled() Is this object currently enabled?
Bool IsFurnitureInUse(Bool abIgnoreReserved) Is any furniture marker on this object in use?
Bool IsFurnitureMarkerInUse(Int aiMarker, Bool abIgnoreReserved) Is the specified furniture marker on this object in use?
Bool IsIgnoringFriendlyHits() Is this object ignoring friendly hits?
Bool IsInDialogueWithPlayer() Is this actor or talking activator currently talking to the player?
Bool IsInInterior() Returns true if the object is in an interior cell.
Bool IsInLocation(Location akLocation) Returns true if the object is currently in that location or a child of that location.
Bool IsLocked() Is the lock on this object locked?
Bool IsMapMarkerVisible() Is this map marker visible to the player?
Bool IsNearPlayer() A quick-and-dirty function to tell if this object is safe to enable or disable
KnockAreaEffect(Float afMagnitude, Float afRadius) Executes a knock effect to an area
Lock(Bool abLock, Bool abAsOwner) Locks or unlocks this object.
MoveTo(ObjectReference akTarget, Float afXOffset, Float afYOffset, Float afZOffset, Bool abMatchRotation) Moves this object to the same location as the passed-in reference, offset by the specified amount.
Bool MoveToIfUnloaded(ObjectReference akTarget, Float afXOffset, Float afYOffset, Float afZOffset) Moves this object to the same location as the passed-in reference, offset by the specified amount, IF this object is not currently loaded.
MoveToInteractionLocation(ObjectReference akTarget) Moves this object to the specified object's interaction location.
MoveToMyEditorLocation() Moves this object to its own editor location.
MoveToNode(ObjectReference akTarget, String asNodeName) Moves this object to the position (and rotation) of the specified node on the specified object's 3D
Actor PlaceActorAtMe(ActorBase akActorToPlace, Int aiLevelMod, EncounterZone akZone) Create an actor at this object's location.
ObjectReference PlaceAtMe(Form akFormToPlace, Int aiCount) Places x copies of the passed in form at this object's current position, returning the last one created.
Bool PlayAnimation(String asAnimation) Plays the specified animation on this object, returning immediately.
Bool PlayAnimationAndWait(String asAnimation, String asEventName) Plays the specified animation on this object and waits for the specified event before returning. (latent)
Bool PlayGamebryoAnimation(String asAnimation, Bool abStartOver, Float afEaseInTime) Plays a legacy nif file based animation
Bool PlayImpactEffect(ImpactDataSet akImpactEffect, String asNodeName, Float afPickDirX, Float afPickDirY, Float afPickDirZ, Float afPickLength, Bool abApplyNodeRotation, Bool abUseNodeLocalRotation) Plays an impact effect.
Bool PlaySyncedAnimationAndWaitSS(String asAnimation1, String asEvent1, ObjectReference akObj2, String asAnimation2, String asEvent2) Plays two animations simultaneously, waiting for events from both.
Bool PlaySyncedAnimationSS(String asAnimation1, ObjectReference akObj2, String asAnimation2) Plays two animations simultaneously.
PlayTerrainEffect(String asEffectModelName, String asAttachBoneName) Plays a terrain effect.
ProcessTrapHit(ObjectReference akTrap, Float afDamage, Float afPushback, Float afXVel, Float afYVel, Float afZVel, Float afXPos, Float afYPos, Float afZPos, Int aeMaterial, Float afStagger) Tells this object to handle the specified trap object hitting it.
PushActorAway(Actor akActorToPush, Int aiKnockbackDamage) Pushes the other actor away from this object as if hit by the specified amount of knockback damage.
Bool RampRumble(Float power, Float duration, Float falloff) Shakes cam/controller based on distance from player
RemoveAllInventoryEventFilters() Remove all inventory event filters on this reference.
RemoveAllItems(ObjectReference akTransferTo, Bool abKeepOwnership, Bool abSilent) Removes all items from this container, optionall transferring them to another one.
RemoveInventoryEventFilter(Form akFilter) Remove a specific inventory event filter.
RemoveItem(Form akItemToRemove, Int aiCount, Bool abSilent) Removes the passed in item from this object's inventory.
Reset(ObjectReference akTarget) Resets this object reference, optionally placing the object at the new target.
Say(Topic akTopicToSay, Actor akActorToSpeakAs, Bool abSpeakInPlayersHead) Causes this reference to speak a topic as if it were the specified actor.
SendStealAlarm(Actor akThief) Sends a steal alarm as if this reference had just been stolen by the actor.
SetActorCause(Actor akActor) Sets this actor as this object's actor cause.
SetActorOwner(ActorBase akActorBase) Sets this actor base as this object's owner.
SetAngle(Float afXAngle, Float afYAngle, Float afZAngle) Sets this object's rotation. Angles are in degrees.
SetAnimationVariableBool(String asVariableName, Bool abNewValue) Sets the value of a variable on the reference's animation graph (bool version).
SetAnimationVariableFloat(String asVariableName, Float afNewValue) Sets the value of a variable on the reference's animation graph (float version).
SetAnimationVariableInt(String asVariableName, Int aiNewValue) Sets the value of a variable on the reference's animation graph (int version).
SetDestroyed(Bool abDestroyed) Sets or clears this object's destroyed flag.
SetFactionOwner(Faction akFaction) Sets this faction as this object's owner.
SetLockLevel(Int aiLockLevel) Sets the lock level on this object.
SetMotionType(Int aiMotionType, Bool abAllowActivate) Sets the havok motion type on this object.
SetNoFavorAllowed(Bool abNoFavor) Sets or clears this object's ability to be not used by a teammate for a favor
SetOpen(Bool abOpen) Opens or closes this object.
SetPosition(Float afX, Float afY, Float afZ) Sets this object's position.
SetScale(Float afScale) Set the current scale of the object
SplineTranslateTo(Float afX, Float afY, Float afZ, Float afAngleX, Float afAngleY, Float afAngleZ, Float afSplineCurve, Float afSpeed) Makes the object translate to the given pos/orient on a spline.
SplineTranslateToRef(ObjectReference arTarget, Float afTangentMagnitude, Float afSpeed, Float afMaxRotationSpeed) Makes the reference translate to the target ref position/orient on a spline at the given speed
SplineTranslateToRefNode(ObjectReference arTarget, String arNodeName, Float afTangentMagnitude, Float afSpeed, Float afMaxRotationSpeed) Makes the reference translate to the target node's position/orient on a spline at the given speed
StopTranslation() Stops any translation on the object.
TetherToHorse(ObjectReference akHorse) Tether a prisoner cart to the given horse.
TranslateTo(Float afX, Float afY, Float afZ, Float afAngleX, Float afAngleY, Float afAngleZ, Float afSpeed, Float afMaxRotationSpeed) Makes the object translate to the given pos/orient.
TranslateToRef(ObjectReference arTarget, Float afSpeed, Float afMaxRotationSpeed) Makes the reference translate to the target ref position/orient at the given speed
Bool WaitForAnimationEvent(String asEventName) Waits for the animation graph to send the specified event.