Difference between revisions of "GetRace - ActorBase"

From the CreationKit Wiki
Jump to navigation Jump to search
imported>Rhavlovick
m (1 revision: Clobber re-import by Henning)
 
imported>JustinOther
(Added note about LVLNs and templated actors/Linked GetLeveledActorBase)
Line 22: Line 22:
Race PlayerRace = PlayerBase.GetRace()
Race PlayerRace = PlayerBase.GetRace()
</source>
</source>
==Notes==
*This will not work for a template NPC or LeveledActor as the actor references (ACHR) are dynamically created.


== See Also ==
== See Also ==
*[[ActorBase Script]]
*[[ActorBase Script]]
*[[GetLeveledActorBase - Actor]]

Revision as of 11:53, 25 January 2013

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