Welcome to
Mod The Sims
Online: 1167
Have an account? Sign in:
If you don't have an account, why not sign up now? It's free!
Other sites: SimsWiki
Reply  Replies: 1 (Who?), Viewed: 3059 times.
Search this Thread
Old 29th May 2020, 12:39 PM motive sleep state: determine if a sim is sleeping #1
Tom Duhamel
Original Poster

Field Researcher

Join Date: Mar 2008
Posts: 302
Thanks: 8379 in 18 Posts
14 Achievements

View My Journal

Expression (Stack Object's motive Sleep state == Literal 0x0000)

Google didn't help, so after looking up a lot of BHAVs, I found out that this expression was how to determine that a sim is sleeping or awaken. Don't ask me where I ended up finding it though.

This worked well during my tests, but when I've put it into the final BHAV where it was meant to go, suddenly it didn't work. It took me several hours to finally find out the problem. I had inverted the condition with:
... == Literal 0x0001
That was an assumption, and it was a wrong one. 0x0000 correctly indicate that a sim is awake. 0x0001 is not the opposite. I don't know what value does, nor do I know if there are more than two states.

I thought this might be useful to someone else.
Old 17th Jun 2020, 3:02 PM #2
Field Researcher

Join Date: Sep 2015
Posts: 227
Thanks: 13727 in 62 Posts
20 Achievements

A Sim should be asleep when their sleep state < Literal 0x0000.

Trying to speak English well. | Q&A on Tumblr | Latest updates of my mods

Section jump:

Powered by MariaDB Some icons by http://dryicons.com.