Skip to content

tes3bodyPartManager⚓︎

A game object which holds information about body parts.

Properties⚓︎

activeBodyParts⚓︎

Read-only. Access to the reference's tes3bodyPartManagerActiveBodyPart objects. It's a 2-dimensional table, with first dimension index values from tes3.activeBodyPartLayer namespace, while its second dimension indexes are values from tes3.activeBodyPart namespace.

Returns:


animationPhase⚓︎

Read-only.

Returns:

  • result (number)

attachNodes⚓︎

Read-only. The access to the reference's attach node objects. Indexes of that table are values from tes3.bodyPartAttachment namespace.

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.