Skip to content

tes3bodyPartManager⚓︎

A game object which holds information about body parts.

Properties⚓︎

animationPhase⚓︎

Read-only.

Returns:

  • result (number)

attachNodes⚓︎

Read-only. An array-style table with access to the reference's attach node objects.

Note

This array is 1-indexed. The array indices correspond to the tes3.bodyPartAttachment table plus 1 to account for Lua's 1-based array indexing. In other words bodyPartManager.attachNodes[tes3.bodyPartAttachment.leftHand + 1] returns the tes3bodyPartManagerAttachNode object corresponding to the left hand.

Returns:


reference⚓︎

Read-only. The access to the reference this body part manager operates for.

Returns:


Methods⚓︎

getActiveBodyPart⚓︎

The method fetches the active body part at a given layer and position. This gives access to the associated scene node, equipped item, and base body part.

local result = myObject:getActiveBodyPart(layer, index)

Parameters:

Returns:


getActiveBodyPartForItem⚓︎

The method fetches active body part of a actor for the given item.

local result = myObject:getActiveBodyPartForItem(item)

Parameters:

  • item (tes3item): The item to fetch the active body part for.

Returns:


removeActiveBodyPart⚓︎

Removes an active body part and optionally sets override data that can be used prevent other items using the same location.

myObject:removeActiveBodyPart(layer, index, setOverride, overrideData)

Parameters:


removeEquippedLayers⚓︎

The method removes all currently equipped layers from the actor.

myObject:removeEquippedLayers()

setBodyPartByIdForObject⚓︎

The method sets a new body part for a given object.

myObject:setBodyPartByIdForObject(item, index, bodyPartId, isFirstPerson)

Parameters:

  • item (tes3item): The item that the body part is from.
  • index (tes3.activeBodyPart): A value from tes3.activeBodyPart namespace.
  • bodyPartId (string): The unique ID of the tes3bodyPart object to set as a new body part for given object.
  • isFirstPerson (boolean): Default: false. A flag which must be set if the target reference is the first person player.

setBodyPartForObject⚓︎

The method sets an active body part slot with an item and bodyPart. Triggers bodyPart event.

myObject:setBodyPartForObject(item, index, bodyPart, isFirstPerson)

Parameters:

  • item (tes3item): The item that the body part is from.
  • index (tes3.activeBodyPart): A value from tes3.activeBodyPart namespace.
  • bodyPart (tes3bodyPart): The tes3bodyPart object to set as a new body part for given object.
  • isFirstPerson (boolean): Default: false. A flag which must be set if the target reference is the first person player.

updateForReference⚓︎

The method updates all body parts for a given reference.

myObject:updateForReference(reference)

Parameters:

  • reference (tes3reference): The reference whose body parts will be updated.