Background for Skyrim SE
Member of the ActorBase script
voidfunctionSetClass(Classc)Native

Description

Wiki Description

Set the class of this actor. (This function requires SKSE)

Documentation Comment

set the Class of the actor


Caveats

CK Wiki - Notes

  • This is a function performed on an ActorBase, meaning all Actors derived from this will have this class.
  • Like most SKSE functions performed on an ActorBase, the change will not persist across gaming sessions. If you want a class change for an Actor to persist, you will need to implement the class change via the OnPlayerLoadGame() event or a similar mechanism.
  • In most cases, the skills of an Actor whose class has been changed via SetClass will not immediately update to reflect the distribution specified by their new class. An actor set to a PC level multiplier will update their skills the next time the PC levels up. Other techniques, such as toggling the actor's race, can be used to induce a more immediate re-evaluation of skills.

Parameters

Classc

CK Wiki Description

the new class for this Actor.


Examples

Class Property Berserker Auto

ActorBase pActorBase = Game.GetPlayer().GetActorBase()
pActorBase.SetClass(Berserker)

Auto-Generated Example

Class myClass__c

myActorBase__toCallFunctionOn.SetClass(myClass__c)

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.