Difference between revisions of "GetSex - ActorBase"

From the CreationKit Wiki
Jump to navigation Jump to search
imported>SLiesegang
 
imported>Chesko
m (Modified example to use GetActorBase() instead of GetBaseObject() as ActorBase.)
Line 22: Line 22:
<source lang="papyrus">
<source lang="papyrus">
; Is the player male?
; Is the player male?
ActorBase PlayerBase = Game.GetPlayer().GetBaseObject() as ActorBase
ActorBase PlayerBase = Game.GetPlayer().GetActorBase()
if (PlayerBase.GetSex() == 0)
if (PlayerBase.GetSex() == 0)
   Debug.Trace("Player is male")
   Debug.Trace("Player is male")

Revision as of 17:22, 1 January 2014

Member of: ActorBase Script

Obtains this actor's sex.

Syntax

int Function GetSex() native

Parameters

None.

Return Value

The actor's sex, which is one of the following:

  • -1: None
  • 0: Male
  • 1: Female

Examples

; Is the player male?
ActorBase PlayerBase = Game.GetPlayer().GetActorBase()
if (PlayerBase.GetSex() == 0)
  Debug.Trace("Player is male")
endIf

See Also