Sim Occult Type with Hybrid

Talk nerdy to us here.
Post Reply
User avatar
Echoweaver
Reactions:
Posts: 391
Joined: January 11th, 2012, 6:00 pm

Sim Occult Type with Hybrid

Post by Echoweaver » November 20th, 2020, 11:33 pm

I'm picking through some Hybrid code, but if someone (Chain) can throw out the answer, I'd be grateful.

I'm writing my first scripting mod -- a simple enhancement of the "Discuss Kelp Recipes" Mermaid social that gives a random chance of learning one of my kelp recipes (here) to a sim who is not a Mermaid.

However, with Hybrid, it occurs to me that determining whether or not a sim is a Mermaid gets a bit more complicated. In fact, My legacy couple just gave birth to a two Witch Mermaids who may or may not also be Imaginary Friends.

For games with Hybrid installed, is there a straightforward way to check for a given occult state?
A study in blockheaded stubbornness: Playing the same legacy since 2009.
Sample a Brave Legacy: http://sims3sample.illation.net http://echoweaver.tumblr.com

User avatar
Chain_Reaction
Site Admin
Reactions:
Posts: 7618
Joined: December 30th, 2011, 6:00 pm
Answers: 82
Contact:

Sim Occult Type with Hybrid

Post by Chain_Reaction » November 21st, 2020, 6:40 am

Hybrid doesn't do anything special to occult data. EA handles multiple occults internally. Just do

Code: Select all

sim.OccultManager.HasOccultType(type)
and you should get your answer.

User avatar
Echoweaver
Reactions:
Posts: 391
Joined: January 11th, 2012, 6:00 pm

Sim Occult Type with Hybrid

Post by Echoweaver » November 21st, 2020, 9:35 am

Oh. Dur. Thanks. I was looking at IActor.currentOccultType and assuming there could be only one.

Thanks!
A study in blockheaded stubbornness: Playing the same legacy since 2009.
Sample a Brave Legacy: http://sims3sample.illation.net http://echoweaver.tumblr.com

Post Reply