Background for Fallout 4

ObjectReference


Inheritance Tree
ScriptExtended By
Structs
Properties

f4sevanilla

floatx=NONE
floaty=NONE
floatz=NONE
intmotion_fixed=0
intmotion_dynamic=1
intmotion_keyframed=2
Events
Functions
voidfunctionUnlock(boolabAsOwner=false)

Unlocks this object.

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 can be safely enabled/disabled/moved with confidence that the player won't see us messing around with the world.

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.

boolfunctionHasRefType(LocationRefTypeakRefType)

Returns if this reference has the specified LocationRefType.

jburgess

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

DEPRECATED: DO NOT USE. Calls MoveTo if both the calling ObjectReference and the akTarget ObjectReference have current locations that are not loaded.

voidfunctionDeleteWhenAble()

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

IMPORTANT NOTE: This function waits until the reference is ready to be deleted, and won't return until it does, so DO NOT use this for quest stages or they'll get hung up until the parent cell detaches.

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.

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

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

voidfunctionAddKeyword(KeywordapKeyword)Native

Adds specified keyword to reference's list of keywords.

voidfunctionAddTextReplacementData(stringasTokenLabel, FormakForm)Native

Adds an association between the given string and the given form for text replacement usage.

voidfunctionAddToMap(boolabAllowFastTravel=false)Native

Adds this Reference (which must be a map marker) to the Players map, optionally making it available for fast-travel.

voidfunctionApplyConveyorBelt(stringaTarget, floataLinVelX, floataLinVelY, floataLinVelZ, boolabOn=true, boolabReverse=false)Native

Applies a conveyor belt to the reference.

voidfunctionApplyHavokImpulse(floatafX, floatafY, floatafZ, floatafMagnitude)Native

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

voidfunctionApplyFanMotor(stringaTarget, floataAxisX, floataAxisY, floataAxisZ, floataForce, boolabOn=true)Native

Applies a fan motor to the reference.

voidfunctionFanMotorOn(boolabOn=true)Native

Sets a fan motor on/off state.

boolfunctionIsFanMotorOn()Native

Get fan motor on/off state.

boolfunctionAttachMod(ObjectModakMod, intaiAttachIndex=0)Native

Attaches a mod to this object.

boolfunctionAttachModToInventoryItem(FormakItem, ObjectModakMod)Native

Attach a mod to an item in this object's inventory.

voidfunctionAttachTo(ObjectReferenceakParent)Native

Attaches this ref to the specified parent ref, which means it will follow the parent's attach ref node.

voidfunctionBlockActivation(boolabBlocked=true, boolabHideActivateText=false)Native

Blocks, or unblocks, normal activation processing for this reference. References with blocked activation will still send 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.

boolfunctionCanProduceForWorkshop()Native

Indicates whether or not the reference can currently produce resources for its Workshop.

voidfunctionClearDestruction()Native

Clears all effects of destruction from the object. Will NOT fire off destruction stage changed events.

voidfunctionClearFromOldLocations()Native

Clears this object from data on all invalid locations

voidfunctionConveyorBeltOn(boolabOn=true)Native

Sets a conveyor belt on/off state.

intfunctionCountActorsLinkedToMe(KeywordapLinkKeyword=NONE, KeywordapExcludeKeyword=NONE)Native

Returns the number of instantiated Actors (across all process levels) who have a LinkedRef (with a specified keyword) to this reference. Does not count dead, disabled, or deleted actors. Can optionally specify an "exclude" keyword; actors with a linkedref using that keyword will not be counted.

intfunctionCountLinkedRefChain(KeywordapKeyword=NONE, intmaxExpectedLinkedRefs=100)Native

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)

intfunctionCountRefsLinkedToMe(KeywordapLinkKeyword=NONE, KeywordapExcludeKeyword=NONE)Native

Returns the number of instantiated ObjectReferences who have a LinkedRef (with a specified keyword) to this reference. Can optionally specify an "exclude" keyword; refs with a linkedref using that keyword will not be counted.

voidfunctionCreateDetectionEvent(ActorakOwner, intaiSoundLevel=0)Native

Creates a detection event at this object's location.

voidfunctionDamageObject(floatafDamage)Native

Damages this object, which may fire off OnDestructionStageChanged events.

voidfunctionDamageValue(ActorValueakAV, floatafDamage)Native

Applies damage to the specified Actor Value on this Object Reference.

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 of necessary. This function is latent and will wait for the fade out and/or disable to happen.

voidfunctionDisableLinkChain(KeywordapKeyword=NONE, boolabFadeOut=false)Native

This function disables all the linked refs, linked in a chain, from this reference (but not this reference). It does not wait for all of them to fade or disable before returning.

voidfunctionDisableNoWait(boolabFadeOut=false)Native

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

voidfunctionDrop(boolabSilent=false)Native

Drops this object from the container that it is in.

ObjectReferencefunctionDropFirstObject(boolabInitiallyDisabled=false)Native

Drops the specified object from this object's inventory.

ObjectReferencefunctionDropObject(FormakObject, intaiCount=1)Native

Drops the specified base 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 and 3d to load (if the 3d is going to load - objects outside the loaded area will not be waited on).

voidfunctionEnableFastTravel(boolabEnable=true)Native

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

voidfunctionEnableLinkChain(KeywordapKeyword=NONE, boolabFadeIn=false)Native

This function enables all the linked refs, linked in a chain, from this reference (but not this reference). Does not wait for all the references to fade in or enable before returning.

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.

ObjectReference[]functionFindAllReferencesOfType(FormakObjectOrList, floatafRadius)Native

Finds all ObjectReference of any of the objects in the list in the loaded area within the given radius of the calling ref.

ObjectReference[]functionFindAllReferencesWithKeyword(FormakKeywordOrList, floatafRadius)Native

Finds all ObjectReference with any required keywords in the loaded area within the given radius of the calling ref.

voidfunctionForceAddRagdollToWorld()Native

Forcibly adds the reference's ragdoll to the world

voidfunctionForceRemoveRagdollFromWorld()Native

Forcibly removes the reference's ragdoll from the world

ActorBasefunctionGetActorOwner()Native

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

Caution! If the owner of this object is a specific Actor (a reference rather than an ActorBase), this function will still return the ActorBase for that Actor. To determine whether this object is owned by a specific actor or an ActorBase, check ObjectReference.GetActorRefOwner() first. If that returns None, only then should you check this function.

ActorfunctionGetActorRefOwner()Native

Gets the Actor reference that owns this object. Will return None if the object isn't owned by a specific actor reference, OR if the owning actor is not currently loaded/persisting.

Actor[]functionGetActorsLinkedToMe(KeywordapLinkKeyword=NONE, KeywordapExcludeKeyword=NONE)Native

Gets an array of instantiated Actors (across all process levels) who are linked to this reference, using a LinkedRef with the specified keyword. Skips over dead, disabled, or deleted actors. Can optionally specify a keyword for which they must NOT have a LinkedRef .

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.

floatfunctionGetBaseValue(ActorValueakAV)Native

Gets the base value of the specified Actor Value from the Object 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 between this object and the passed in one.

Obtains this reference's editor Location.

Gets the EncounterZone to which this object belongs (or None if none).

FactionfunctionGetFactionOwner()Native

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

floatfunctionGetHeadingAngle(ObjectReferenceakOther)Native

Gets the angle between this object's heading, and the direction the other object is in, in degrees. If you were to add this angle to this object's rotation around the z axis, and then set the rotation of this object to that - it would be facing the other object.

floatfunctionGetHeight()Native

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

intfunctionGetInventoryValue()Native

Returns the value of this reference's inventory.

intfunctionGetItemCount(FormakItem=NONE)Native

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

intfunctionGetComponentCount(FormakItem=NONE)Native

Returns how many of the specified components are in this reference's inventory.

Returns the container this reference is in, if any. (Returns None if not in a container)

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.

ObjectReference[]functionGetLinkedRefChain(KeywordapKeyword=NONE, intiMaxExpectedLinkedRefs=100)Native

This function returns an array of objectreferences representing the "linked ref chain" hanging of the reference it is called on. For example. If myObject has linkedref to ObjectA which has a linkedref to ObjectB which has a linkedref to ObjectC, and you call myObject.GetLinkedRefChain() it will return an array holding ObjectA, ObjectB, and ObjectC.

This function returns an array of objectreferences representing the "linked ref children" of the reference it is called on, using only those linked with the specified keyword.

intfunctionGetLockLevel()Native

Returns the level of the lock attached to this object. If there is no lock, it will return 0 - very easy.

Returns array of the LocationRefTypes for this object.

ObjectReferencefunctionGetNthLinkedRef(intaiLinkedRef, KeywordapKeyword=NONE)Native

Gets the Nth linked ref from this object.

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.

floatfunctionGetRadioFrequency()Native

Returns the frequency of this radio receiver.

floatfunctionGetRadioVolume()Native

Returns the volume of this radio receiver.

floatfunctionGetResourceDamage(ActorValueakValue=NONE)Native

Returns the total amount of damage on either the given resource actor value, or all resource actor values on this object.

float[]functionGetSafePosition(floataSearchRadius=-1, floataSafeRadius=-1)Native

Get the nearest navmesh 'safe' position of radius aSafeRadius within aSearchRadius.

ObjectReference[]functionGetRefsLinkedToMe(KeywordapLinkKeyword=NONE, KeywordapExcludeKeyword=NONE)Native

Gets an array of all instantiated ObjectReferences that are linked to this reference, using a LinkedRef with the specified keyword. Can optionally specify a keyword for which they must NOT have a LinkedRef.

Finds all ObjectReference linked to the Workshop reference that are owned by the given Actor.

floatfunctionGetWorkshopResourceDamage(ActorValueakValue)Native

Returns the total amount of damage on either the given resource actor value across all items in the Workshop.

ObjectReference[]functionGetWorkshopResourceObjects(ActorValueakAV=NONE, intaiOption=0)Native

Finds all ObjectReference that are linked to the given Workshop reference that produce resources. Optionally, you can get a list of references that produce only a given resource. You can also optionally specify finding either objects with damaged resources, or objects with undamaged resources.

floatfunctionGetScale()Native

Returns the current scale of this reference.

CellfunctionGetTeleportCell()Native

Gets the target cell for this teleport ref.

CellfunctionGetTransitionCell()Native

Gets the transition cell for this teleport ref.

floatfunctionGetTransmitterDistance()Native

Returns the distance between this radio transmitter and the player (Pipboy radio).

intfunctionGetTriggerObjectCount()Native

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

floatfunctionGetValue(ActorValueakAV)Native

Gets the specified Actor Value from the Object Reference.

floatfunctionGetValuePercentage(ActorValueakAV)Native

Gets the specified actor value from the actor as a percentage of its maximum value (from 0 to 1).

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

boolfunctionHasActorRefOwner()Native

Returns true if an Actor reference has been set to own this object -- even if that Actor is not currently loaded/persisting.

boolfunctionHasDirectLOS(ObjectReferenceakTarget, stringasSourceNode="", stringasTargetNode="")Native

Checks to see if this reference has line-of-sight to the target object.

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.

boolfunctionHasKeyword(KeywordapKeyword)Native

Queries if a reference has a keyword in its list of keywords. This basically operates the same way as Form.HasKeyword(...), but can be run on inventory objects.

boolfunctionHasKeywordInFormList(FormListakKeywordList)Native

Checks to see if any of the keywords in the form list is attached to this reference. If the form list contains no keywords, returns false. This basically operates the same way as Form.HasKeywordInFormList(...), but can be run on inventory objects.

boolfunctionHasLocRefType(LocationRefTypeakRefType)Native

Returns if this reference has the specified LocationRefType.

boolfunctionHasNode(stringasNodeName)Native

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

boolfunctionHasOwner()

Checks to see if this reference is owned in any way (by actor base, actor ref, or faction).

boolfunctionHasSharedPowerGrid(ObjectReferenceakCompare)Native

Returns true if this reference is on the same power grid as the compared reference.

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, opened, etc, but will still send OnActivate events)

boolfunctionIs3DLoaded()Native

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

boolfunctionIsConveyorBeltOn()Native

Get conveyor belt on/off state.

boolfunctionIsCreated()Native

Checks to see if this object was created in-game.

boolfunctionIsDeleted()Native

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

boolfunctionIsDestroyed()Native

Checks to see if this object is currently destroyed.

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

Returns whether the lock on this object was broken (or false if there is no lock).

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.

boolfunctionIsOwnedBy(ActorakOwner)Native

Is this ref owned by the given actor?

boolfunctionIsPowered()Native

Checks if this object is considered powered.

boolfunctionIsQuestItem()Native

Checks if this object is considered a quest item.

boolfunctionIsRadioOn()Native

Returns whether this radio receiver is on or not.

boolfunctionIsRefInTransitionCell(ObjectReferenceakRef)Native

Is the given ref in the transformed bounds of this teleport ref's transition cell?

boolfunctionIsTeleportAreaLoaded()Native

Is the teleport area of the given ref fully loaded?

boolfunctionIsWithinBuildableArea(ObjectReferenceakRef)Native

Is this reference within the buildable area of the given Workshop Activator?

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.

voidfunctionMakeRadioReceiver(floatafFrequency, floatafVolume=1.0, OutputModelaOverrideModel=NONE, boolabActive=true, boolabNoStatic=false)Native

Make this object a radio receiver. Override the current state if the object is already a receiver. If the object is a reference to an Activator, the radio on/off state will toggle when activated. Once the object is a receiver, the other radio receiver functions may be applied to it.

voidfunctionMakeTransmitterRepeater(ObjectReferenceakTransmitterToRepeat, floatafInnerRadius, floatafOuterRadius, boolabUnlimitedRange=false)Native

Make this object into a radio transmitter-repeater. Repeaters can extend the range of an existing, limited-range radio transmitter. All radio scene actions sent to the source transmitter are detectable by radio receivers that are within range of any of the source's repeaters.

voidfunctionModValue(ActorValueakAV, floatafAmount)Native

Modifies the specified Actor Value on the Object Reference.

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.

voidfunctionMoveToMyEditorLocation()Native

Moves this reference to its original editor location and orientation.

voidfunctionMoveToNearestNavmeshLocation()Native

Moves this reference to the nearest location that's on a Navmesh that an actor could reach by walking.

voidfunctionMoveToNode(ObjectReferenceakTarget, stringasNodeName, stringasMatchNodeName="")Native

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

LocationfunctionOpenWorkshopSettlementMenu(KeywordakActionKW, MessageastrConfirm=NONE, LocationaLocToHighlight=NONE)Native

If this is a workshop NPC, opens up the Workshop Caravan submenu, which allows you to send this NPC to another workshop settlement.

LocationfunctionOpenWorkshopSettlementMenuEx(KeywordakActionKW, MessageastrConfirm=NONE, LocationaLocToHighlight=NONE, FormListakIncludeKeywordList=NONE, FormListakExcludeKeywordList=NONE, boolabExcludeZeroPopulation=false, boolabOnlyOwnedWorkshops=true, boolabTurnOffHeader=false, boolabOnlyPotentialVassalSettlements=false, boolabDisableReservedByQuests=false)Native

If this is a workshop NPC, opens up the Workshop Caravan submenu, which allows you to send this NPC to another workshop settlement.

intfunctionRaidTargetsAvailable(KeywordakActionKW, MessageastrConfirm=NONE, LocationaLocToHighlight=NONE, FormListakIncludeKeywordList=NONE, FormListakExcludeKeywordList=NONE, boolabExcludeZeroPopulation=false, boolabOnlyOwnedWorkshops=true, boolabTurnOffHeader=false, boolabOnlyPotentialVassalSettlements=false, boolabDisableReservedByQuests=false)Native

If this is a workshop NPC, checks to see if the OpenWorkshopSettlementsMenuEx will find any valid workshops.

ObjectReferencefunctionPlaceAtMe(FormakFormToPlace, intaiCount=1, boolabForcePersist=false, boolabInitiallyDisabled=false, boolabDeleteWhenAble=true)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.

ObjectReferencefunctionPlaceAtNode(stringasNodeName, FormakFormToPlace, intaiCount=1, boolabForcePersist=false, boolabInitiallyDisabled=false, boolabDeleteWhenAble=true, boolabAttach=false)Native

Makes X new references of the passed in form, optionally forcing them to persist, and places them at the position of the given node in our object's 3D, returning the last one it created. If abAttach is true, the newly created ref is also attached to the calling one.

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.

voidfunctionPauseAudio()Native

Pauses the audio file for the Reference

voidfunctionPreloadExteriorCell()Native

[DEV SERVER] Loading description...

voidfunctionPreloadTargetArea()Native

Preloads the target area for the calling ref. If the ref is a teleport door linked to an interior or exterior, the teleport location is the preloaded area. If a non-teleport ref is in an exterior, its location is used. The function will fail for other refs and if called to preload an exterior while the player is in an exterior.

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.

voidfunctionRecalculateResources()Native

If used on a Workshop activator (i.e. a workbench), forces the Workbench to re-calculate all resource actor values for all producers in the workshop.

voidfunctionRemoveAllItems(ObjectReferenceakTransferTo=NONE, boolabKeepOwnership=false)Native

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

voidfunctionRemoveComponents(ComponentakComponent, intaiCount, boolabSilent=false)Native

Removes the a certain count of a specified component from the container's inventory, scrapping objects as necessary, and returning the change to the container.

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

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

voidfunctionRemoveItemByComponent(FormakComponentToRemove, intaiCount=1, boolabSilent=false, ObjectReferenceakOtherContainer=NONE)Native

Removes an arbitrary number of arbitrary items such that at least the specified number of the specified component is removed from this reference's inventory, possibly silently.

voidfunctionRemoveKeyword(KeywordapKeyword)Native

Removes a keyword from a reference's list of keywords.

voidfunctionRemoveAllMods()Native

Remove all mods from this object. Note that some actors / items, such as robots and handmade guns, may not have any geometry left if you call this on them, but will still be in the world. Which might be awkward.

voidfunctionRemoveAllModsFromInventoryItem(FormakItem)Native

Remove all mods from an item in this object's inventory. Note that some items, such as hand-made guns, won't have any geometry left if you call this on them, even though they will remain in the object's inventory, which might be weird.

voidfunctionRemoveMod(ObjectModakMod)Native

Removes a mod from this object. Specifically, looks for a mod on this object of type akMod and if it finds one, removes it.

voidfunctionRemoveModFromInventoryItem(FormakItem, ObjectModakMod)Native

Remove a mod from an inventory item in this object's inventory.

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.

voidfunctionRepair()Native

Repair damage on this reference. This is designed for Workshop items. If the reference is destructible, it will clear the destruction state. If the reference is a turret, it will heal the damage and revert it to a proper functional state.

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.

voidfunctionResetKeyword(KeywordapKeyword)Native

Resets any addition or removal of the specified keyword, reverting the state of the keyword to being controlled by the base object and any attached aliases.

voidfunctionRestoreValue(ActorValueakAV, floatafAmount)Native

Restores (or "heals") damage done to the specified Actor Value on this Object Reference.

voidfunctionResumeAudio()Native

Resume the audio file for the Reference

voidfunctionReverseConveyorBelt(boolabReverse=true)Native

Sets a conveyor belt reverse state.

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

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

voidfunctionSayCustom(KeywordakKeywordToSay, ActorakActorToSpeakAs=NONE, boolabSpeakInPlayersHead=false, ObjectReferenceakTarget=NONE)Native

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

intfunctionSellItem(FormItem, intValue, intamountToSell=-1, boolsilent=false, FormpaymentItem=NONE, ObjectReferencePaymentContainer=NONE)

"Sells" X amount of the specified item from this reference's inventory.

voidfunctionSendStealAlarm(ActorakThief)Native

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

voidfunctionSetActivateTextOverride(MessageakText)Native

Sets the full name of the given message to be this ref's activate text.

voidfunctionSetActorCause(ActorakActor)Native

Sets the actor as the actor cause of this object.

voidfunctionSetActorOwner(ActorBaseakActorBase, boolabNoCrime=false)Native

Sets the actor base as the owner of this object.

voidfunctionSetActorRefOwner(ActorakActor, boolabNoCrime=false)Native

Sets a specific Actor (that is to say, an Actor reference, not an ActorBase) 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.

voidfunctionSetAttractionActive(KeywordapKeyword, boolabActive=true)Native

This function sets whether this ObjectReference should send attraction-object story manager events to actors with the specified attraction keyword.

voidfunctionSetConveyorBeltVelocity(floatafLinVelX, floatafLinVelY, floatafLinVelZ)Native

Sets a conveyor belt velocity in local-space.

voidfunctionSetDestroyed(boolabDestroyed=true)Native

Sets or clears this object's destroyed flag.

voidfunctionSetDirectAtTarget(ObjectReferenceakTarget)Native

Sets or clears the target of the direct-at behavior modifier. This reference must have a behavior animation on it with a direct-at modifier to do anything.

voidfunctionSetFactionOwner(FactionakFaction, boolabNoCrime=false)Native

Sets the faction as the owner of this object.

voidfunctionSetHarvested(boolabHarvested)Native

Allows script to set whether or not a given Flora ObjectReference has been harvested.

voidfunctionSetLinkedRef(ObjectReferenceakLinkedRef, KeywordapKeyword=NONE)Native

Sets the reference linked to this one under the specified keyword.

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.

voidfunctionSetLocRefType(LocationakLoc, LocationRefTypeakRefType)Native

Sets an in-game created object to be the given loc ref type for the given location.

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

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

voidfunctionSetOpen(boolabOpen=true)Native

Opens or closes this object.

voidfunctionSetPersistLoc(LocationakLoc)Native

Sets the persist location on an in-game created object.

voidfunctionSetPlayerHasTaken(boolabTaken=true)Native

Sets/clears the "player has taken" flag on this reference.

voidfunctionSetPosition(floatafX, floatafY, floatafZ)Native

Sets the object's current position in the world.

voidfunctionSetRadioOn(boolabOn=true)Native

Turns on or off this radio receiver.

voidfunctionSetRadioFrequency(floatafFrequency)Native

Sets the frequency this radio receiver is tuned to.

voidfunctionSetRadioVolume(floatafVolume)Native

Sets the volume of this radio receiver.

voidfunctionSetScale(floatafScale)Native

Sets the object's current scale.

voidfunctionSetValue(ActorValueakAV, floatafValue)Native

Sets the base value specified Actor Value on the Object Reference to the passed-in value. Any modifiers are left intact.

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.

voidfunctionStartWorkshop(boolabStart=true)Native

Starts or stops workshop mode for this workshop object.

voidfunctionStopTranslation()Native

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

voidfunctionStoreInWorkshop(FormakBaseItem, intaiCount=1)Native

If the reference is a Workshop Container, stores the given object with an optional count.

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.

boolfunctionWaitFor3DLoad()Native

Waits for this object's 3d to load, or until it knows the 3d won't load (object is disabled, cell unloads, etc).

voidfunctionWaitForWorkshopResourceRecalc()Native

Waits for any resource recalculation on this workshop to finish. If no recalculation is in progress (or this reference isn't a workshop) it will return immediately.

boolfunctionIsInLocation(LocationakLocation)

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

ObjectMod[]functionGetAllMods()Native

Returns all the Object Mods for this reference.

If this object is a BendableSpline it will link to the two ObjectReferences it is connect to, otherwise it will link to other BendableSplines

ObjectReferencefunctionAttachWire(ObjectReferenceakRef, Formspline=NONE)Native

Attaches a BendableSpline base object between to other references.

Convenience function to AttachWire to both create the wire and enable it

boolfunctionScrap(ObjectReferenceakWorkshop)Native

Scraps this object reference and disconnects any wires if necessary
This function is debug only as it is not ready for release, it scraps
but it has problems unpowering connected objects, also doesn't give
the materials back yet

stringfunctionGetDisplayName()Native

Returns the current name of this ObjectReference.

Form[]functionGetInventoryItems()Native

Returns an array of all items held by this container

floatfunctionGetInventoryWeight()Native

Returns the total weight of this objects inventory

ObjectReference:ConnectPoint[]functionGetConnectPoints()Native

Returns connect points to an object, if used on wired objects you may only
get one wire ref unless the object has multiple attach points
'object' is not None when there is another object directly connected
to the attach point that also has a workshop connect point
Object 3d must be loaded for this function to work at all

boolfunctionTransmitConnectedPower()Native

Links power to any objects connected by attach point (The two attach points are touching)
e.g. progammatically placed conduits
Should be called on each programmatically placed conduit/junction/radiatior

<UNKNOWN_SCRIPT: MatSwap:RemapData>[]functionApplyMaterialSwap(MatSwapmSwap, boolrenameMaterial=false)Native

Applies a Material Swap to this reference, optionally renaming the material.

voidfunctionSetMaterialSwap(MatSwapmSwap)Native

[DEV SERVER] Loading description...

MatSwapfunctionGetMaterialSwap()Native

Gets the internal persistent Material Swap for this reference. Some ObjectReference placed in the world through the Editor may have this already filled.

Some data provided by the Fallout 4 Creation Kit Wiki. Licensed under the Creative Commons Attribution-Share Alike 4.0 license.