Background for Skyrim SE
Member of the ActorBase script
voidfunctionSetVoiceType(VoiceTypenVoice)Native

Description

Wiki Description

Changes the voice of myActor to newvoice.

This change alone is not persistent when saving the game. You must store the new voicetype in a formlist and recover it from there with onplayerloadgame when loading the save game. ( Remember that this works only on the second save game load after introducing a new player alias ! )

Voicetype property newvoice auto ;;;;;;; ( fill in script properties tab )

Formlist property voicelist auto ;;;;;; ( dito ) must have been created empty in CK

                                ;;;;;; every actor must have its own list

Actor property myactor auto ;;;;; ( filled elsewhere )

Function somefunc()

      Myactor.getactorbase().setvoicetype(newvoice)
      Voicelist.revert()  ;;;; must be empty for next statement
      Voicelist.addform(newvoice) ;;;; remember voicetype for this actor in entry 0

Endfunction

In Script on player alias:

Event onplayerloadgame()

    Voicetype vt = voicelist.getat(0) as voicetype   ;;; only one entry !
    Myactor.getactorbase().setvoicetype(vt)  ;;; remembered for new save load

Endevent


Parameters

  1. VoiceTypenVoice


Examples

No human-generated examples found for this function.

Auto-Generated Example

VoiceType myVoiceType__nVoice

myActorBase__toCallFunctionOn.SetVoiceType(myVoiceType__nVoice)

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.