GetActorBase - Actor

From Creation Kit
Jump to: navigation, search

Member of: Actor Script

Gets the ActorBase of the actor.


ActorBase Function GetActorBase()


  • None.

Return Value

The ActorBase for this actor


; Get the sex of an actor by using GetActorBase() so you can call the GetSex() function
if myActorProperty.GetActorBase().GetSex() == 1
    ;do something


  • For leveled actors (or potentially leveled actors), use GetLeveledActorBase instead of GetActorBase.
  • If you call this on a leveled Actor, it will return the base object shown in the editor - in other words, the leveled base object. You will not get the base object for the actor in the world, and any subsequent calls on that ActorBase may produce unexpected or undefined results.
    • For example, calling <Actor>.GetActorBase().GetRace() on a leveled actor returns an undefined result. In practice, it ends up being the first race the game knows about-- a Fox in Skyrim, Valentine's race in Fallout 4, etc., no matter what object you called it on. This is almost certainly not what you want.

See Also