Background for Skyrim SE
Member of the ActorBase script
voidfunctionSetNthHeadPart(HeadPartheadPart, intslotPart)Native

Description

Wiki Description

Changes the specified head part of this actor. (This function requires SKSE)


Caveats

CK Wiki - Notes

Changes are permanent for the Player only, and are updated after the game is saved & reloaded, or by calling QueueNiNodeUpdate().

Changes to NPCs only last for a single session and are updated when the Player exits and re-enters the NPC's Cell; or by calling Actor.Disable() and Actor.Enable(); or by calling QueueNiNodeUpdate(). However, NPCs will be affected by the gray-face bug.


Parameters

HeadPartheadPart

CK Wiki Description

the new HeadPart for the ActorBase

intslotPart

CK Wiki Description

the Nth HeadPart to change


Examples

; gives the Player Aerin hair & eyes
HeadPart AerinHair = Aerin.GetNthHeadPart(1)
Player.SetNthHeadPart(AerinHair, 5)
Player.SetNthHeadPart(Aerin.GetNthHeadPart(4), 3)

; gives the Player the Ysmir's beard 
if ( Player.GetNthHeadPart(6) != BeardList.GetAt(3) as HeadPart ) ; BeardList.GetAt(3) = YsmirBeard
     Player.SetNthHeadPart(BeardList.GetAt(3) as HeadPart, 6) 
endif

Auto-Generated Example

HeadPart myHeadPart__headPart
int myInt__slotPart

myActorBase__toCallFunctionOn.SetNthHeadPart(myHeadPart__headPart, myInt__slotPart)

Related Pages


Additional References

View this function’s page on the Skyrim Creation Kit Wiki

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