GetRace - ActorBase

From the CreationKit Wiki
Revision as of 11:53, 25 January 2013 by imported>JustinOther (Added note about LVLNs and templated actors/Linked GetLeveledActorBase)
Jump to navigation Jump to search

Member of: ActorBase Script

Obtains this actor's Race.

Syntax

Race Function GetRace() native

Parameters

None.

Return Value

The Race the actor is.

Examples

; Get the race that the player is
ActorBase PlayerBase = Game.GetPlayer().GetBaseObject() as ActorBase
Race PlayerRace = PlayerBase.GetRace()

Notes

  • This will not work for a template NPC or LeveledActor as the actor references (ACHR) are dynamically created.

See Also