CGIModels Posted January 4, 2021 Share Posted January 4, 2021 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 More sharing options...
IsharaMeradin Posted January 4, 2021 Share Posted January 4, 2021 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 More sharing options...
CGIModels Posted January 4, 2021 Author Share Posted January 4, 2021 Got it working - thank you. Link to comment Share on other sites More sharing options...
Recommended Posts