Difference between revisions of "ObjectReference Script"

From the CreationKit Wiki
Jump to navigation Jump to search
imported>SteveL
(→‎Member Functions: adding missing param)
imported>Jog
Line 22: Line 22:


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


== Events ==
== Events ==

Revision as of 12:56, 20 February 2012


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.

Global Functions

None

Member Functions

Function Activate(ObjectReference akActivator)

  • Have the passed in reference activate this object.

Function AddInventoryEventFilter(Form akFilter)

  • Adds an inventory event filter to this reference.

Function AddItem(Form akItemToAdd, int aiCount, bool abSilent)

  • Adds the passed in item to this object's inventory.

Function AddKeyIfNeeded(ObjectReference ObjectWithNeededKey)

  • Adds the key to ObjectWithNeededKey if this object's inventory does not contain it already.

Function AddToMap(bool abAllowFastTravel)

  • Adds this map marker to the map, optionally making it available for fast travel.

Function ApplyHavokImpulse(float afX, float afY, float afZ, float afMagnitude)

  • Apply a Havok impulse force to this object.

Function BlockActivation(bool abBlocked)

  • Blocks (or unblocks) normal activation processing for this reference.

int Function CalculateEncounterLevel(int aiDifficulty)

  • Calculate this object's encounter level, using the specified difficulty.

bool Function CanFastTravelToMarker()

  • Can the player fast travel to this map marker?

Function ClearDestruction()

  • Clears all effects of destruction from this object.

int Function CountLinkedRefChain(keyword apKeyword, int maxExpectedLinkedRefs)

  • Counts the number of linked refs that are in a linked Ref chain

Function CreateDetectionEvent(Actor akOwner, int aiSoundLevel)

  • Create a detection event at this reference, with the specified owner.

Function DamageObject(float afDamage)

  • Damages this object and advances the destruction stage.

Function Delete()

  • Deletes this object.

Function DeleteWhenAble()

  • Waits until this reference is out of the loaded area and then deletes it

Function Disable(bool abFadeOut)

  • Disables this object.

Function DisableLinkChain(Keyword apKeyword, bool abFadeOut)

  • Disables all of the references that are linked, in a chain, to this one.

Function DisableNoWait(bool abFadeOut)

  • Disables this object and does not wait for the object to be disable or faded out.

Function DropObject(Form akObject, int aiCount)

  • Drops the specified object from this object's inventory.

Function Enable(bool abFadeIn)

  • Enables this object.

Function EnableFastTravel(bool abEnable) native

  • Enables or disables fast travel to this map marker.

Function EnableLinkChain(Keyword apKeyword)

  • Enables all of the references that are linked, in a chain, to this one.

Function EnableNoWait(bool abFadeIn)

  • Enables this object and does not wait for the object to be enabled or faded in.

Function ForceAddRagdollToWorld() native

  • Forcibly adds the ragdoll of a reference to the world

Function ForceRemoveRagdollFromWorld() native

  • Forcibly removes the ragdoll of a reference from the world

ActorBase Function GetActorOwner()

  • Obtains the actor base that owns this object.

float Function GetAngleX()

  • Obtains this object's rotation around the x axis.

float Function GetAngleY()

  • Obtains this object's rotation around the y axis.

float Function GetAngleZ()

  • Obtains this object's rotation around the z axis.

bool Function GetAnimationVariableBool(string asVariableName)

  • Fetches the value of a variable on the reference's animation graph (bool version).

float Function GetAnimationVariableFloat(string asVariableName)

  • Fetches the value of a variable on the reference's animation graph (float version).

int Function GetAnimationVariableInt(string asVariableName)

  • Fetches the value of a variable on the reference's animation graph (int version).

Form Function GetBaseObject()

  • Obtains this reference's base object.

int Function GetCurrentDestructionStage()

  • Gets the object's current stage of destruction.

Location Function GetCurrentLocation()

  • Obtains this reference's current location.

Scene Function GetCurrentScene()

  • Obtains the scene that this reference is currently participating in, if any.

float Function GetDistance(ObjectReference akOther)

  • Calculates the distance between this object and the passed in one.

Location Function GetEditorLocation()

  • Obtains this reference's editor location.

Faction Function GetFactionOwner()

  • Gets the faction that owns this reference.

float Function GetHeadingAngle(ObjectReference akOther)

  • Gets the angle between this object's heading, and the direction the other object is in.

float Function GetHeight()

  • Gets the height of this object

int Function GetItemCount(Form akItem)

  • Returns how many of the specified item is in this object's inventory.

float Function GetItemHealthPercent()

  • Returns the item health percent of this object (1.0 == 100%).

Key Function GetKey()

  • Obtains the key that unlocks this object (if any).

float Function GetLength()

  • Obtains the length of this object.

ObjectReference Function GetLinkedRef(Keyword apKeyword)

  • Returns our linked reference for the given Keyword, if any.

int Function GetLockLevel()

  • Obtains the level of the lock on this object.

float Function GetMass()

  • Obtains this object's mass in Havok.

ObjectReference Function GetNthLinkedRef(int aiLinkedRef)

  • Obtains the nth linked ref from this object.

int Function GetOpenState()

  • Obtains this object's current "open state".

Cell Function GetParentCell()

  • Obtains the cell this object is currently in.

float Function GetPositionX()

  • Returns this object's current X position.

float Function GetPositionY()

  • Returns this object's current Y position.

float Function GetPositionZ()

  • Returns this object's current Z position.

float Function GetScale()

  • Get this object's current scale.

int Function GetTriggerObjectCount()

  • Returns the number of objects inside this trigger volume.

VoiceType function GetVoiceType()

  • Obtains the VoiceType for this actor or talking activator.

float Function GetWidth()

  • Get the current width of the object.

Worldspace Function GetWorldSpace()

  • Returns the worldspace this reference is in.

bool Function HasEffectKeyword(Keyword akKeyword)

  • Returns if this reference has an active effect coming from a magic effect with the specified keyword attached

bool Function HasNode(string asNodeName)

  • Returns if this reference has the specified name node in its 3D.

bool Function HasRefType(LocationRefType akRefType)

Function IgnoreFriendlyHits(bool abIgnore)

  • Flags this reference as ignoring (or not ignoring) friendly hits

Function InterruptCast()

  • Interrupts any spellcasting this object may be doing.

bool Function IsActivateChild(ObjectReference akChild)

  • Returns whether the passed in reference is an activate child of this reference.

bool Function IsActivationBlocked()

  • Returns whether normal activation processing is currently blocked on this reference or not.

bool Function Is3DLoaded()

  • Checks to see if this reference's 3D data is currently loaded or not.

bool Function IsDisabled()

  • Is this object currently disabled?

bool Function IsEnabled()

  • Is this object currently enabled?

bool Function IsFurnitureInUse(bool abIgnoreReserved)

  • Is any furniture marker on this object in use?

bool Function IsFurnitureMarkerInUse(int aiMarker, bool abIgnoreReserved)

  • Is the specified furniture marker on this object in use?

bool Function IsIgnoringFriendlyHits()

  • Is this object ignoring friendly hits?

bool Function IsInDialogueWithPlayer()

  • Is this actor or talking activator currently talking to the player?

bool Function IsInInterior ()

  • Returns true if the object is in an interior cell.

bool Function IsInLocation (Location akLocation)

  • Returns true if the object is currently in that location or a child of that location.

bool Function IsLocked()

  • Is the lock on this object locked?

bool Function IsMapMarkerVisible()

  • Is this map marker visible to the player?

bool Function IsNearPlayer()

  • A quick-and-dirty function to tell if this object is safe to enable or disable

Function KnockAreaEffect(float afMagnitude, float afRadius)

  • Executes a knock effect to an area

Function Lock(bool abLock, bool abAsOwner)

  • Locks or unlocks this object.

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

Function MoveToInteractionLocation(ObjectReference akTarget)

  • Moves this object to the specified object's interaction location.

Function MoveToMyEditorLocation()

  • Moves this object to its own editor location.

Function MoveToNode(ObjectReference akTarget, string asNodeName)

  • Moves this object to the position (and rotation) of the specified node on the specified object's 3D

Actor Function PlaceActorAtMe(ActorBase akActorToPlace, int aiLevelMod, EncounterZone akZone)

  • Create an actor at this object's location.

ObjectReference Function 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 Function PlayAnimation(string asAnimation)

  • Plays the specified animation on this object, returning immediately.

bool Function PlayAnimationAndWait(string asAnimation, string asEventName)

  • Plays the specified animation on this object and waits for the specified event before returning. (latent)

bool Function PlayGamebryoAnimation(string asAnimation, bool abStartOver, float afEaseInTime)

  • Plays a legacy nif file based animation

bool Function PlayImpactEffect (ImpactDataSet akImpactEffect, string asNodeName, float afPickDirX, float afPickDirY, float afPickDirZ, float afPickLength, bool abApplyNodeRotation, bool abUseNodeLocalRotation)

  • Plays an impact effect.

bool Function PlaySyncedAnimationAndWaitSS(string asAnimation1, string asEvent1, ObjectReference akObj2, string asAnimation2, string asEvent2)

  • Plays two animations simultaneously, waiting for events from both.

bool Function PlaySyncedAnimationSS(string asAnimation1, ObjectReference akObj2, string asAnimation2)

  • Plays two animations simultaneously.

Function PlayTerrainEffect (string asEffectModelName, string asAttachBoneName)

  • Plays a terrain effect.

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

Function PushActorAway(Actor akActorToPush, int aiKnockbackDamage)

  • Pushes the other actor away from this object as if hit by the specified amount of knockback damage.

bool Function RampRumble(float power, float duration, float falloff)

  • Shakes cam/controller based on distance from player

Function RemoveAllInventoryEventFilters()

  • Remove all inventory event filters on this reference.

Function RemoveAllItems(ObjectReference akTransferTo, bool abKeepOwnership, bool abSilent)

  • Removes all items from this container, optionall transferring them to another one.

Function RemoveInventoryEventFilter(Form akFilter)

  • Remove a specific inventory event filter.

Function RemoveItem(Form akItemToRemove, int aiCount, bool abSilent)

  • Removes the passed in item from this object's inventory.

Function Reset(ObjectReference akTarget)

  • Resets this object reference, optionally placing the object at the new target.

Function Say(Topic akTopicToSay, Actor akActorToSpeakAs, bool abSpeakInPlayersHead)

  • Causes this reference to speak a topic as if it were the specified actor.

Function SendStealAlarm(Actor akThief)

  • Sends a steal alarm as if this reference had just been stolen by the actor.

Function SetActorCause(Actor akActor)

  • Sets this actor as this object's actor cause.

Function SetActorOwner(ActorBase akActorBase)

  • Sets this actor base as this object's owner.

Function SetAngle(float afXAngle, float afYAngle, float afZAngle)

  • Sets this object's rotation. Angles are in degrees.

Function SetAnimationVariableBool(string asVariableName, bool abNewValue)

  • Sets the value of a variable on the reference's animation graph (bool version).

Function SetAnimationVariableFloat(string asVariableName, float afNewValue)

  • Sets the value of a variable on the reference's animation graph (float version).

Function SetAnimationVariableInt(string asVariableName, int aiNewValue)

  • Sets the value of a variable on the reference's animation graph (int version).

Function SetDestroyed(bool abDestroyed)

  • Sets or clears this object's destroyed flag.

Function SetFactionOwner(Faction akFaction)

  • Sets this faction as this object's owner.

Function SetLockLevel(int aiLockLevel)

  • Sets the lock level on this object.

Function SetMotionType(int aiMotionType, bool abAllowActivate)

  • Sets the havok motion type on this object.

Function SetNoFavorAllowed(bool abNoFavor)

  • Sets or clears this object's ability to be not used by a teammate for a favor

Function SetOpen(bool abOpen)

  • Opens or closes this object.

Function SetPosition(float afX, float afY, float afZ)

  • Sets this object's position.

Function SetScale(float afScale)

  • Set the current scale of the object

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

Function 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

Function 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

Function StopTranslation()

  • Stops any translation on the object.

Function TetherToHorse(ObjectReference akHorse)

  • Tether a prisoner cart to the given horse.

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

Function TranslateToRef(ObjectReference arTarget, float afSpeed, float afMaxRotationSpeed)

  • Makes the reference translate to the target ref position/orient at the given speed

bool Function WaitForAnimationEvent(string asEventName)

  • Waits for the animation graph to send the specified event.

Events

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