Hi there! You are currently browsing as a guest. Why not create an account? Then you get less ads, can thank creators, post feedback, keep a list of your favourites, and more!
Quick Reply
Search this Thread
Test Subject
Original Poster
#1 Old 27th Oct 2022 at 8:13 PM Last edited by YolkSims : 27th Oct 2022 at 8:40 PM.
Default What does SimDescription Partner/mPartner return?
I'm trying to determine if a sim has a partner. Using the HasPartner bool in MiniSimDescription was a bust because it's not static.
If a sim doesn't have a partner, does it return null? In essence, can I use a null check to filter out sims with partners?

Code:
bool EitherHasPartner = false;
                    SimDescription ActorPartner = Actor.SimDescription.Partner;
                    SimDescription TargetPartner = Target.SimDescription.Partner;

                    if ((ActorPartner != null) || (TargetPartner != null))
                    {
                        EitherHasPartner = true;
                    }
                    else
                    {
                        EitherHasPartner = false;
                    }

                    bool EitherHasSpouse = false;
                    Genealogy ActorSpouse = Actor.Genealogy.Spouse;
                    Genealogy TargetSpouse = Target.Genealogy.Spouse;

                    if ((ActorSpouse != null) || (TargetSpouse != null))
                    {
                        EitherHasSpouse = true;
                    }
                    else
                    {
                        EitherHasSpouse = false;
                    }
Advertisement
Test Subject
Original Poster
#2 Old 31st Oct 2022 at 4:37 PM
Bump? Sorry, I'm kind of stuck without knowing this.
Space Pony
#3 Old 31st Oct 2022 at 7:09 PM
Quote: Originally posted by YolkSims
Bump? Sorry, I'm kind of stuck without knowing this.





As you can see Partner just returns mPartner


And here you can see that clearing the partner means setting it to null.

So if a sim does not have a partner SimDescription.Partner || SimDescription.mPartner will be null

Seems like you waited quite a bit for an answer, in these cases checking a sim via a test script might be giving you the info you are looking for faster.
Back to top