Background for Skyrim SE

The ObjectReference Script

    The ObjectReference script is a part of Skyrim SE’s Papyrus scripting ecosystem. It is included with the base game, and is extended/modified by modded sources such as Skyrim Script Extender x64 (SKSE).

    For this script, the Papyrus index knows about:

    • 35 events
    • 161 functions
    • 10 properties


    Inheritance Tree

    ScriptExtended By
    ScriptExtended By

    Properties

    • sksevanilla

      • floatx=NONE
      • floaty=NONE
      • floatz=NONE
      • intmotion_dynamic=1
      • intmotion_sphereintertia=2
      • intmotion_boxintertia=3
      • intmotion_keyframed=4
      • intmotion_fixed=5
      • intmotion_thinboxintertia=6
      • intmotion_character=7

      Events

      • eventOnActivate(ObjectReferenceakActionRef)

        Event called when the object reference is activated.

      • Event called when this reference moves from a detached cell to an attached one.

      • Event called when this reference's parent cell is attached.

      • Event called when this reference's parent cell is detached.

      • eventOnCellLoad()

        Event called when every object's 3d in this object's parent cell loaded and ready. At this point you should be able to animate these objects, or manipulate them in other ways without issues. This event is sent every time the cell is loaded, which may happen multiple times in a single game session.

      • eventOnClose(ObjectReferenceakActionRef)

        Event called when the object has finished closing. (Like a door that has finished animating shut, but not a book that has finished closing.)

      • eventOnContainerChanged(ObjectReferenceakNewContainer, ObjectReferenceakOldContainer)

        Event called when the object reference enters/leaves/moves between containers.

      • eventOnDestructionStageChanged(intaiOldStage, intaiCurrentStage)

        Event called when the object's destruction stage worsens.

      • Event called when this reference moves from an attached cell to a detached one.

      • eventOnEquipped(ActorakActor)

        Event called when the object reference has been equipped by an actor.

      • eventOnGrab()

        Event called when the object has been grabbed by the player (z-keyed, or grabbed via telekinesis).

      • eventOnTrigger(ObjectReferenceakActionRef)

        Event called when the object reference is a trigger and has been triggered. This event will be sent every so often while a reference stays inside the trigger box (approximately two times a second).

      • Event called when the object reference is a trigger volume and has been entered.

      • Event called when the object reference is a trigger volume and has been left.

      • eventOnHit(ObjectReferenceakAggressor, FormakSource, ProjectileakProjectile, boolabPowerAttack, boolabSneakAttack, boolabBashAttack, boolabHitBlocked)

        Event called when the object reference is hit by a weapon or projectile.

      • eventOnItemAdded(FormakBaseItem, intaiItemCount, ObjectReferenceakItemReference, ObjectReferenceakSourceContainer)

        Event received when an item is inserted into this object's container.

      • eventOnItemRemoved(FormakBaseItem, intaiItemCount, ObjectReferenceakItemReference, ObjectReferenceakDestContainer)

        Event received when an item is removed from this object's container.

      • eventOnLoad()

        Event called when the object's 3d is loaded and ready. At this point you should be able to animate the object, or manipulate it in other ways without issues. This event is sent every time the 3d is loaded, which may happen multiple times in a single game session.

      • Event called when the lock on this object's state changes. (Locked, unlocked, level changed, etc)

      • Event called when a magic effect is about to be applied to the object reference.

      • eventOnOpen(ObjectReferenceakActionRef)

        Event called when the object has finished opening. (Like a door that has finished animating open)

      • eventOnRead()

        Event received when this object (which is a book) has been read. In other words, it is sent when the book UI opens a book.

      • eventOnRelease()

        Event called when the object has has been released by the player (un-z-keyed, or released from telekinesis).

      • eventOnReset()

        Event called when the object is reset.

      • eventOnSell(ActorakSeller)

        Event called when the object has just been sold by someone.

      • eventOnSpellCast(FormakSpell)

        Event called when a spell is cast by this object reference.

      • Event called when the object reference almost done translating to the destination. This is very useful for things like critters, where you want constant motion, and the script execution delay would otherwise make it possible for the reference to stay immobile for a few frames.

      • Event called when the object reference done translating to the destination.

      • Event called when the object reference failed translating to the destination for any reason (including when a new request is submitted).

      • eventOnTrapHit(ObjectReferenceakTarget, floatafXVel, floatafYVel, floatafZVel, floatafXPos, floatafYPos, floatafZPos, intaeMaterial, boolabInitialHit, intaeMotionType)

        Event called when the object reference is a trap and has hit a live target. This event is sent every so often as long as a trap object is in contact with a live target.

      • eventOnTrapHitStart(ObjectReferenceakTarget, floatafXVel, floatafYVel, floatafZVel, floatafXPos, floatafYPos, floatafZPos, intaeMaterial, boolabInitialHit, intaeMotionType)

        Event called when the object reference is a trap and has started hitting a live target.

      • Event called when the object reference is a trap and has stopped hitting a live target.

      • eventOnUnequipped(ActorakActor)

        Event called when the object reference has been unequipped by an actor.

      • eventOnUnload()

        Event called when the object's 3d has been unloaded. This event is sent every time the 3d is unloaded, which may happen multiple times in a single game session.

      • eventOnWardHit(ObjectReferenceakCaster, SpellakSpell, intaiStatus)

        Event called when the object reference is using a ward that is hit by a spell.

      Functions

      • boolfunctionrampRumble(floatpower=0.5, floatduration=0.25, floatfalloff=1600.0)

        Intended as a quick way to cause some controller and camera rumble. Automatically tapers intensity of the effect based on players distance from the point of origin/calling reference.

      • boolfunctionIsNearPlayer()

        A function that checks to see if this reference is either in the same cell or within 3000 units of the player. Commonly used in situations where the developer wants to be confident that an object can be enabled/disabled/moved/etc without the player being able to witness the action happening.

      • boolfunctionIsInInterior()

        Checks to see if this object is in an interior cell.

      • boolfunctionMoveToIfUnloaded(ObjectReferenceakTarget, floatafXOffset=0.0, floatafYOffset=0.0, floatafZOffset=0.0)

        Moves this reference to the location of the target reference, with the specified offset, if this reference is currently unloaded (has no 3D). If it is loaded, it does nothing.

      • voidfunctionMoveToWhenUnloaded(ObjectReferenceakTarget, floatafXOffset=0.0, floatafYOffset=0.0, floatafZOffset=0.0)

        DEPRECATED ----- DO NOT USE

        Member of: ObjectReference

        Moves this reference to the location of the target reference, with the specified offset, if both this reference and the target reference are in current locations which are not currently loaded.

        Caution: this will pause the calling script until the actor is unloaded and moved.

      • voidfunctionDeleteWhenAble()

        Waits for this reference to lose its parent cell, or for its parent cell to become detached, then deletes it.

      • voidfunctionAddKeyIfNeeded(ObjectReferenceObjectWithNeededKey)

        Checks this object's inventory for a key used by the parameter ObjectWithNeededKey. If this object does not have the key, it creates it and adds it to its inventory.

      • boolfunctionActivate(ObjectReferenceakActivator, boolabDefaultProcessingOnly=false)Native

        Activates this item with the specified reference as the activator.

      • Sets up a dependent animated object
        This function should be used only with a coder supervision. It is left undocumented because it can cause dangling pointers as well as very broken functionality
        for the dependent object if used improperly.

      • voidfunctionAddInventoryEventFilter(FormakFilter)Native

        Adds a form as a "filter" for ObjectReference.OnItemAdded(...) and ObjectReference.OnItemRemoved(...) events sent to this object. The filter will be applied only to the specific Reference, Alias, or Active Magic Effect it is added to, so each will need to have filters applied to them independently.

      • voidfunctionAddItem(FormakItemToAdd, intaiCount=1, boolabSilent=false)Native

        Adds X of the specified item to this reference's inventory, possibly silently.

      • voidfunctionAddToMap(boolabAllowFastTravel=false)Native

        Adds this reference (which must be a map marker) to the player's map, optionally making it available for fast-travel.

      • voidfunctionApplyHavokImpulse(floatafX, floatafY, floatafZ, floatafMagnitude)Native

        Applies a Havok impulse force to this object of the specified direction and magnitude.

      • voidfunctionBlockActivation(boolabBlocked=true)Native

        Blocks, or unblocks, normal activation processing for this reference. References with blocked activation will still send ObjectReference.OnActivate(...) events to scripts attached to them.

      • intfunctionCalculateEncounterLevel(intaiDifficulty=4)Native

        Calculates the reference's encounter level, based on the player's level, the area's level, and the passed-in difficulty.

      • boolfunctionCanFastTravelToMarker()Native

        Checks if the player can fast travel to this map marker.

      • voidfunctionClearDestruction()Native

        Clears all effects of destruction from the object. Will NOT fire off ObjectReference.OnDestructionStageChanged(...).

      • voidfunctionCreateDetectionEvent(ActorakOwner, intaiSoundLevel=0)Native

        Creates a detection event at this object's location.

      • voidfunctionDamageObject(floatafDamage)Native

        Damages this object, which may fire off ObjectReference.OnDestructionStageChanged(...) events.

      • voidfunctionDelete()Native

        Flags this object reference as wanting to be deleted. A reference that is flagged for delete will be deleted as soon as:

        • It is no longer in a script property
        • It is no longer registered for updates
        • It is no longer being watched for Anim Events
        • It is no longer held in a quest Alias

        Only references created in game can actually be deleted.

      • voidfunctionDisable(boolabFadeOut=false)Native

        Disables this reference, fading it out if necessary. This function is latent and will wait for the fade out and/or disable to happen.

      • voidfunctionDisableNoWait(boolabFadeOut=false)Native

        Disables this reference, fading it out of necessary. This function will not wait for the fade or the disable to happen before returning.

      • ObjectReferencefunctionDropObject(FormakObject, intaiCount=1)Native

        Drops the specified object from this object's inventory.

      • voidfunctionEnable(boolabFadeIn=false)Native

        Enables this reference, popping it into existance. This function is latent and will wait for the enable to happen.

      • voidfunctionEnableFastTravel(boolabEnable=true)Native

        Enables or disables fast travel to this reference (which must be a map marker).

      • voidfunctionEnableNoWait(boolabFadeIn=false)Native

        Enables this reference, popping it into existence. This function will return immediately and not wait for the object to be enabled or faded in.

      • voidfunctionForceAddRagdollToWorld()Native

        Forcibly adds the reference's ragdoll to the world

      • voidfunctionForceRemoveRagdollFromWorld()Native

        Forcibly removes the reference's ragdoll from the world — that is, it forces an actor to stop ragdolling.

      • ActorBasefunctionGetActorOwner()Native

        Gets the ActorBase that owns this object. Will return None if the object isn't owned by an actor.

      • floatfunctionGetAngleX()Native

        Gets this object's rotation around the x axis.

      • floatfunctionGetAngleY()Native

        Gets this object's rotation around the y axis.

      • floatfunctionGetAngleZ()Native

        Gets this object's rotation around the z axis.

      • boolfunctionGetAnimationVariableBool(stringarVariableName)Native

        Gets the value of a variable on the reference's animation graph - Bool version.

      • intfunctionGetAnimationVariableInt(stringarVariableName)Native

        Gets the value of a variable on the reference's animation graph - Int version.

      • floatfunctionGetAnimationVariableFloat(stringarVariableName)Native

        Gets the value of a variable on the reference's animation graph - Float version.

      • FormfunctionGetBaseObject()Native

        Obtains the base object for this reference.

      • intfunctionGetCurrentDestructionStage()Native

        Obtains the current destruction stage of the object.

      • Obtains this reference's current Location.

      • ScenefunctionGetCurrentScene()Native

        Obtains the Scene this reference is currently in, if any. If the reference isn't participating in a scene, it will return None.

      • floatfunctionGetDistance(ObjectReferenceakOther)Native

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

      • Obtains this reference's editor Location.

      • FactionfunctionGetFactionOwner()Native

        Gets the Faction that owns this object. Will return None if the object isn't owned by a faction.

      • floatfunctionGetHeadingAngle(ObjectReferenceakOther)Native

        Returns the angle between this object's current heading, and the direction from this object toward a target object, in degrees. If you were to add the returned angle to this object's current rotation around the z axis, it would then be facing the target object.

      • floatfunctionGetHeight()Native

        Calculates and returns the height of this reference (distance between the bounding box min and max z values).

      • intfunctionGetItemCount(FormakItem)Native

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

      • floatfunctionGetItemHealthPercent()Native

        Returns the item health percent of this object. Items begin at 100% (1.0) and can be increased via crafting.

      • KeyfunctionGetKey()Native

        Obtains the Key that unlocks this object (or None if the object does not have a key, or is not lockable).

      • floatfunctionGetLength()Native

        Calculates and returns the length of this reference (distance between the bounding box min and max y values).

      • ObjectReferencefunctionGetLinkedRef(KeywordapKeyword=NONE)Native

        Gets the reference linked to this one. If there is no linked reference, it returns None.

      • intfunctionGetLockLevel()Native

        Returns the level of the lock attached to this object. This number can be anything from 0-255, with different values representing lock difficulties (Novice–Expert). If there is no lock, it will return 0 - very easy.

      • intfunctioncountLinkedRefChain(KeywordapKeyword=NONE, intmaxExpectedLinkedRefs=100)

        This function counts the number of linked refs that are in a linked Ref chain (example: A is linked to B is linked to C - this function will return 3)

      • ObjectReferencefunctionGetNthLinkedRef(intaiLinkedRef)Native

        Gets the Nth linked ref from this object.

      • voidfunctionEnableLinkChain(KeywordapKeyword=NONE)

        This function enables all the linked refs, linked in a chain, from this reference.

      • voidfunctionDisableLinkChain(KeywordapKeyword=NONE, boolabFadeOut=false)

        This function disables all the linked refs, linked in a chain, from this reference.

      • floatfunctionGetMass()Native

        Returns the mass of this object in Havok.

      • intfunctionGetOpenState()Native

        Obtains this object's current "open state".

      • CellfunctionGetParentCell()Native

        Obtains the Cell this object is currently in.

      • floatfunctionGetPositionX()Native

        Returns the current X position of the reference.

      • floatfunctionGetPositionY()Native

        Returns the current Y position of the reference.

      • floatfunctionGetPositionZ()Native

        Returns the current Z position of the reference.

      • floatfunctionGetScale()Native

        Returns the current scale of this reference.

      • intfunctionGetTriggerObjectCount()Native

        Obtains the number of objects inside this trigger volume. (Obviously only works if this is actually a trigger and will error otherwise)

      • VoiceTypefunctionGetVoiceType()Native

        Obtains the VoiceType for this actor or talking activator.

      • floatfunctionGetWidth()Native

        Calculates and returns the width of this reference (distance between the bounding box min and max x values).

      • WorldSpacefunctionGetWorldSpace()Native

        Obtains the WorldSpace the object reference is in.

      • Returns self cast as an actor

      • boolfunctionHasEffectKeyword(KeywordakKeyword)Native

        Checks to see if the specified keyword is attached to a magic effect that belongs to an active effect currently on this reference.

      • boolfunctionHasNode(stringasNodeName)Native

        Checks to see if the reference has the specified named node in its 3D.

      • boolfunctionHasRefType(LocationRefTypeakRefType)Native

        Returns if this reference has the specified LocationRefType.

      • voidfunctionIgnoreFriendlyHits(boolabIgnore=true)Native

        Flags this reference as ignoring (or not ignoring) friendly hits. In other words, it won't turn hostile after several hits from a friendly opponent.

      • voidfunctionInterruptCast()Native

        Interrupts and stops any spell-casting this object might be doing.

      • boolfunctionIsActivateChild(ObjectReferenceakChild)Native

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

      • boolfunctionIsActivationBlocked()Native

        Checks to see if this object currently has its normal activation processing blocked. (Won't be picked up, openend, etc, but will still send ObjectReference.OnActivate(...) events)

      • boolfunctionIs3DLoaded()Native

        Checks to see if this object has its 3D currently loaded.

      • boolfunctionIsDeleted()Native

        Checks to see if this object is currently flagged for delete.

      • boolfunctionIsDisabled()Native

        Checks to see if this object is currently disabled.

      • boolfunctionIsEnabled()

        Checks to see if this object is currently enabled. (The opposite of ObjectReference.IsDisabled())

      • boolfunctionIsFurnitureInUse(boolabIgnoreReserved=false)Native

        Checks to see if any furniture marker on this object is in use, optionally ignoring markers that are reserved, but not currently used.

      • boolfunctionIsFurnitureMarkerInUse(intaiMarker, boolabIgnoreReserved=false)Native

        Checks to see if the specified furniture marker on this object is in use, optionally ignoring reservations.

      • boolfunctionIsIgnoringFriendlyHits()Native

        Returns whether this reference is ignoring friendly hits or not.

      • boolfunctionIsInDialogueWithPlayer()Native

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

      • boolfunctionIsLockBroken()Native

        Is the lock on this object broken?

      • boolfunctionIsLocked()Native

        Checks to see if this object is currently locked. If no lock is attached, returns false.

      • boolfunctionIsMapMarkerVisible()Native

        Checks if this map marker is visible to the player.

      • voidfunctionKnockAreaEffect(floatafMagnitude, floatafRadius)Native

        Executes a knock effect on actors in an area.

      • voidfunctionLock(boolabLock=true, boolabAsOwner=false)Native

        Locks or unlocks this object. If told to lock it, and no lock is attached, a very easy lock will be attached. If the object is open, and it is told to lock it, the object will be snapped closed.

      • voidfunctionMoveTo(ObjectReferenceakTarget, floatafXOffset=0.0, floatafYOffset=0.0, floatafZOffset=0.0, boolabMatchRotation=true)Native

        Moves this reference to the location of the target reference, with the specified offset.

      • voidfunctionMoveToInteractionLocation(ObjectReferenceakTarget)Native

        Moves this reference to the location of the target reference's interaction location, also matching its rotation.

      • voidfunctionMoveToMyEditorLocation()Native

        Moves this reference to its original editor location and orientation.

      • voidfunctionMoveToNode(ObjectReferenceakTarget, stringasNodeName)Native

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

      • ObjectReferencefunctionPlaceAtMe(FormakFormToPlace, intaiCount=1, boolabForcePersist=false, boolabInitiallyDisabled=false)Native

        Makes X new references of the passed in form, optionally forcing them to persist, and places them at our reference's location, returning the last one it created.

      • ActorfunctionPlaceActorAtMe(ActorBaseakActorToPlace, intaiLevelMod=4, EncounterZoneakZone=NONE)Native

        Places a new Actor at this object's location.

      • boolfunctionPlayAnimation(stringasAnimation)Native

        Starts playing the specified animation on the object and returns immediately. (Internally, it sends the named event to the object's animation graph) If it succeeds, it returns true.

      • boolfunctionPlayAnimationAndWait(stringasAnimation, stringasEventName)Native

        Plays the specified animation on the object and returns when the specified event is hit. (Internally, it sends the named event to the object's animation graph and waits for the named event to be fired) If it succeeds, it returns true. This function is latent.

      • boolfunctionPlayGamebryoAnimation(stringasAnimation, boolabStartOver=false, floatafEaseInTime=0.0)Native

        Plays a legacy nif file based animation, optionally starting the animation over from the beginning with the specified ease-in time.

      • boolfunctionPlayImpactEffect(ImpactDataSetakImpactEffect, stringasNodeName="", floatafPickDirX=0.0, floatafPickDirY=0.0, floatafPickDirZ=-1, floatafPickLength=512.0, boolabApplyNodeRotation=false, boolabUseNodeLocalRotation=false)Native

        Plays an impact effect on the reference.

      • boolfunctionPlaySyncedAnimationSS(stringasAnimation1, ObjectReferenceakObj2, stringasAnimation2)Native

        Plays two animations at once. Note that if the first animation fails to fire, the second animation will still play, and the function will still return success.

      • boolfunctionPlaySyncedAnimationAndWaitSS(stringasAnimation1, stringasEvent1, ObjectReferenceakObj2, stringasAnimation2, stringasEvent2)Native

        Plays two animations at once and waits for behavior graph events from each. Note that if the first animation fails to fire, the second animation will still play, and the function will still return success. Also, if the first animation fails to play, it won't listen for the event from the first animation.

      • voidfunctionPlayTerrainEffect(stringasEffectModelName, stringasAttachBoneName)Native

        Plays a terrain effect that is attached to the specified bone of this object.

      • voidfunctionProcessTrapHit(ObjectReferenceakTrap, floatafDamage, floatafPushback, floatafXVel, floatafYVel, floatafZVel, floatafXPos, floatafYPos, floatafZPos, intaeMaterial, floatafStagger)Native

        Tells this reference to handle getting hit by a trap, dealing the specified amount of damage and possibly applying a pushback force.

      • voidfunctionPushActorAway(ActorakActorToPush, floataiKnockbackForce)Native

        Knocks back the specified actor away from this object with the specified amount of force, as if an explosion had gone off.

      • voidfunctionRemoveAllInventoryEventFilters()Native

        Removes all "filters" applied to inventory events on this object. Every item added or removed from this object's inventory will now send events. The filters are removed separately from the reference, any aliases, and any magic effects on the reference, so each will need to remove filters from themselves independently.

      • voidfunctionRemoveAllItems(ObjectReferenceakTransferTo=NONE, boolabKeepOwnership=false, boolabRemoveQuestItems=false)Native

        Removes all items from this object's inventory, optionally transferring them to another object.

      • voidfunctionRemoveInventoryEventFilter(FormakFilter)Native

        Removes a form as a "filter" for ObjectReference.OnItemAdded(...) and ObjectReference.OnItemRemoved(...) events sent to this object. The filters are removed separately from the reference, any aliases, and any magic effects on the reference, so each will need to remove filters from themselves independently. If all filters are removed, the object will get events for everything again.

      • voidfunctionRemoveItem(FormakItemToRemove, intaiCount=1, boolabSilent=false, ObjectReferenceakOtherContainer=NONE)Native

        Removes X of the specified item from this reference's inventory, possibly silently.

      • Removes a previously added dependent object
        This function should be used only with a coder supervision. It is left undocumented because it can cause dangling pointers as well as very broken functionality
        for the dependent object if used improperly.

      • voidfunctionReset(ObjectReferenceakTarget=NONE)Native

        Resets this object reference to its original location, resets its inventory, resurrects it if it's an actor, and in general tries to get it back to its original state. May optionally move it to the location of the specified reference instead.

      • voidfunctionSay(TopicakTopicToSay, ActorakActorToSpeakAs=NONE, boolabSpeakInPlayersHead=false)Native

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

        Don‘t put important statements in Topic Info fragment scripts of a say topic - they are often not processed correctly.

      • voidfunctionSendStealAlarm(ActorakThief)Native

        Has this object behave as if the actor had just tried to steal it.

      • voidfunctionSetActorCause(ActorakActor)Native

        Sets the actor as the actor cause of this object.

      • voidfunctionSetActorOwner(ActorBaseakActorBase)Native

        Sets the actor base as the owner of this object.

      • voidfunctionSetAngle(floatafXAngle, floatafYAngle, floatafZAngle)Native

        Sets the object's current rotation in the world.

      • voidfunctionSetAnimationVariableBool(stringarVariableName, boolabNewValue)Native

        Sets the value of a variable on the reference's animation graph - Bool version.

      • voidfunctionSetAnimationVariableInt(stringarVariableName, intaiNewValue)Native

        Sets the value of a variable on the reference's animation graph - Int version.

      • voidfunctionSetAnimationVariableFloat(stringarVariableName, floatafNewValue)Native

        Sets the value of a variable on the reference's animation graph - Float version.

      • voidfunctionSetDestroyed(boolabDestroyed=true)Native

        Sets or clears this object's destroyed flag.

      • voidfunctionSetFactionOwner(FactionakFaction)Native

        Sets the faction as the owner of this object.

      • voidfunctionSetLockLevel(intaiLockLevel)Native

        Sets the level of the lock attached to this object. If there is no lock, it will attach one, but leave it unlocked.

      • voidfunctionSetMotionType(intaeMotionType, boolabAllowActivate=true)Native

        Sets the object's havok motion type. This function is widely used as part of the included defaultDisableHavokOnLoad script, which is intended to make physics-enabled objects behave as if they were static.

      • voidfunctionSetNoFavorAllowed(boolabNoFavor=true)Native

        Controls whether the player can ask a follower to operate this object. This function can be used to prevent a follower from activating an activator, looting a container, or picking the lock on a door.

      • voidfunctionSetOpen(boolabOpen=true)Native

        Opens or closes this object.

      • voidfunctionSetPosition(floatafX, floatafY, floatafZ)Native

        Sets the object's current position in the world.

      • voidfunctionSetScale(floatafScale)Native

        Sets the object's current scale.

      • voidfunctionTranslateTo(floatafX, floatafY, floatafZ, floatafXAngle, floatafYAngle, floatafZAngle, floatafSpeed, floatafMaxRotationSpeed=0.0)Native

        Makes the object translate to the passed in position and orientation at the given speed.

      • voidfunctionSplineTranslateTo(floatafX, floatafY, floatafZ, floatafXAngle, floatafYAngle, floatafZAngle, floatafTangentMagnitude, floatafSpeed, floatafMaxRotationSpeed=0.0)Native

        Makes the object translate to the passed in position and orientation at the given speed using a spline.

      • voidfunctionSplineTranslateToRefNode(ObjectReferencearTarget, stringarNodeName, floatafTangentMagnitude, floatafSpeed, floatafMaxRotationSpeed=0.0)Native

        Makes the object translate to a node on the passed reference's 3D (matching position and rotation) at the given speed using a spline.

      • voidfunctionStopTranslation()Native

        Forcibly stops the object from translating (cancels a previous translation request).

      • voidfunctionTranslateToRef(ObjectReferencearTarget, floatafSpeed, floatafMaxRotationSpeed=0.0)

        Makes the object translate to the passed reference (matching position and rotation) at the given speed.

      • voidfunctionSplineTranslateToRef(ObjectReferencearTarget, floatafTangentMagnitude, floatafSpeed, floatafMaxRotationSpeed=0.0)

        Makes the object translate to the passed reference (matching position and rotation) at the given speed using a spline.

      • voidfunctionTetherToHorse(ObjectReferenceakHorse)Native

        Function to tether the prisoner cart to a horse.

      • boolfunctionWaitForAnimationEvent(stringasEventName)Native

        Waits for the specified animation event from this object to happen before returning.

      • boolfunctionIsInLocation(LocationakLocation)

        Checks to see if this object is in the specified location, or in a child of the specified location.

      • boolfunctionIsContainerEmpty()Native

        Returns if the container/inventory is empty

      • voidfunctionRemoveAllStolenItems(ObjectReferenceakTransferTo=NONE)Native

        Removes all stolen items, transfering it to the other object if passed.

      • voidfunctionSetContainerAllowStolenItems(boolsetAllowStolenItems)Native

        For Containers only. Sets whether or not to allow stolen items to appear in the menu.

      • intfunctionGetAllItemsCount()Native

        Gets the number of items in a container/invetory

      • intfunctionGetNumItems()Native

        Returns the number of items in a container. (This function requires SKSE)

      • FormfunctionGetNthForm(intindex)Native

        Returns the Nth form within a container relative to the total number acquired with ObjectReference.GetNumItems(). (This function requires SKSE)

      • floatfunctionGetTotalItemWeight()Native

        This Function will return the total item weight of a ObjectReference.

      • floatfunctionGetTotalArmorWeight()Native

        This Function will return the total armor weight of an ObjectReference.

      • boolfunctionIsHarvested()Native

        Returns whether the flora has been harvested or not. (This function requires SKSE)

      • voidfunctionSetHarvested(boolharvested)Native
      • voidfunctionSetItemHealthPercent(floathealth)Native

        This Function will set a ObjectReference's health (tempering state) to the specified amount. Works on weapons and armours, including clothes and rings.

      • voidfunctionSetItemMaxCharge(floatmaxCharge)Native

        Only works on ObjectReferences that have user-enchants

      • floatfunctionGetItemMaxCharge()Native

        This Function will Return the maximum charge of an ObjectReference.

      • floatfunctionGetItemCharge()Native

        This Function will Return the Charge of an ObjectReference.

      • voidfunctionSetItemCharge(floatcharge)Native

        This Function will set a ObjectReference's charge to the specified amount.

      • voidfunctionResetInventory()Native
      • boolfunctionIsOffLimits()Native

        This Papyrus function provides access to one of the internal game engine functions that Skyrim's UI uses to determine whether interacting with some object may be a crime. It's one of the functions that the game engine calls when it wants to know whether to override an object's activation prompt with "Steal" or "Steal from," for example.

      • stringfunctionGetDisplayName()Native

        Returns the name of this reference
        this is the name that is displayed

      • boolfunctionSetDisplayName(stringname, boolforce=false)Native

        Changes a reference's display name. This is the name seen when aiming at the reference in the game world, and when the reference is placed into an inventory. The change is persistent with save games.

      • Returns the enable parent object

      • Returns the player-made enchantment if there is one

      • voidfunctionSetEnchantment(Enchantmentsource, floatmaxCharge)Native

        Changes an item's player-made enchantment to something else
        None enchantment will remove the existing enchantment
        does not delete the custom enchantment, only removes it

      • voidfunctionCreateEnchantment(floatmaxCharge, MagicEffect[]effects, float[]magnitudes, int[]areas, int[]durations)Native

        Creates a new enchantment on the item given the specified parameters
        all arrays must be the same size
        created enchantments are not purged from the save when removed or overwritten
        exact same enchantments are re-used by the game

      • intfunctionGetNumReferenceAliases()Native

        Returns the number of ref aliases holding this reference

      • Returns the nth ReferenceAlias holding this reference

      • PotionfunctionGetPoison()Native

        Returns the poison applied to the weapon

      • voidfunctionGetAllForms(FormListtoFill)Native

        Returns all base forms in the inventory/container into the specified FormList

      • Form[]functionGetContainerForms()Native

        Returns an array containing all base forms in a specified container.

      • Returns all of the aliases holding this reference

      Some data provided by the Skyrim Creation Kit Wiki. Licensed under the Creative Commons Attribution-ShareAlike license.