GetActorBase - Actor

Revision as of 13:37, 9 November 2015 by imported>Cdcooley (→‎Notes)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Member of: Actor Script

Gets the ActorBase of the actor.

SyntaxEdit

ActorBase Function GetActorBase()

ParametersEdit

  • None.

Return ValueEdit

The ActorBase for this actor

ExamplesEdit

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

NotesEdit

  • 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 AlsoEdit