GetActorBase - Actor

From the Fallout4 CreationKit Wiki
Jump to navigation Jump to search

Member of: Actor Script

Gets the ActorBase of the actor.

Syntax[edit | edit source]

ActorBase Function GetActorBase()

Parameters[edit | edit source]

  • None.

Return Value[edit | edit source]

The ActorBase for this actor

Examples[edit | edit source]

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

Notes[edit | edit source]

  • 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[edit | edit source]