SetClass - ActorBase

From the CreationKit Wiki
Revision as of 14:17, 27 November 2013 by imported>DreamKing (Added note that the class change will not persist across gaming sessions.)
Jump to navigation Jump to search

SKSE Member of: ActorBase Script

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

Syntax

Function SetClass(Class c) native

Parameters

  • Class: the new class for this Actor.

Return Value

None.

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.


Examples

Class Property Berserker Auto

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

See Also