Jump to content

Help with GetSex - ActorBase Script


CGIModels

Recommended Posts

Hi -

I am just trying to get this example code to work on the person I am talking to instead of the player.

What do I change to make it work on the person I am talking to?

 

https://www.creationkit.com/index.php?title=GetSex_-_ActorBase

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

I feel like an idiot - I been searching google and I am more confused than I started.

Thanks

Link to comment
Share on other sites

Has to be used inside the topic info fragment (see here):

 

If akSpeaker ;make sure we have a valid actor talking
  Int SpeakerSex = akSpeaker.GetActorBase().GetSex()
  If SpeakerSex == 0
    Debug.Trace("The speaker is male")
  ElseIf SpeakerSex == 1
    Debug.Trace("The speaker is female")
  Else
    Debug.Trace("The speaker is non-binary")
  EndIf
EndIf

 

At least that is my understanding of how it would work.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...