Description
Wiki Description
Flags this actor as having a fully char gen editable skeleton or not.
Documentation Comment
Flags/unflags this actor as requiring a char gen skeleton
Caveats
CK Wiki - Notes
- The CharGenSkeleton is incompatible with Power Armor, so don't set it on an actor that could be in Power Armor while you need him to have the CharGenSkeleton.
- Adding or removing the CharGenSkeleton causes the Actor's animation graph to be deleted and re-initialized. That means that any animation events you register on the actor beforehand will become unregistered.
- This function does not wait for the Actor to be fully re-initialized before the script moves on. If you need to know that when the Actor has finished re-initializing (for example: because you don't want the player to be able to switch to third person when his third person animations aren't loaded) then see the following example below.
Example: When is the CharGenSkeleton reset done?
Function SomeFunction()
;register for this event before adding/removing the CharGenSkeleton. We want to know when it unregisters, which means
;the CharGenSkeleton has finished deleting the graph
RegisterForAnimationEvent(Game.GetPlayer(), "FirstPersonInitialized")
;now add or remove the CharGenSkeleton. In this example, we're removing it
PlayerREF.SetHasCharGenSkeleton(False)
EndFunction
;we registered for the FirstPersonIntitialized event, but what we really want to know is when it unregisters
Event OnAnimationEventUnregistered(ObjectReference akSource, string asEventName)
If asEventName == "FirstPersonInitialized"
;now register for the event that fires when the third person graph is fully available
RegisterForAnimationEvent(Game.GetPlayer(), "initiateStart")
EndIf
EndEvent
Event OnAnimationEvent(ObjectReference akSource, string asEventName)
;CharGenSkeleton has finished being removed or added, third person animations are now available
If (asEventName == "initiateStart")
;whatever scripting you want when the graph is available, such as enabling third person controls
EndIf
EndEvent
Parameters
boolabCharGen=true
CK Wiki Description
True to set actor for full char gen editing, false to restore them to normal.
- Default:True
Examples
; Set player spouse up for editing in char gen menu
PlayerSpouse.SetHasCharGenSkeleton(true)Auto-Generated Example
bool myBool__abCharGen
myActor__toCallFunctionOn.SetHasCharGenSkeleton(myBool__abCharGen)Related Pages
Additional References
View this function’s page on the Fallout 4 Creation Kit Wiki
