|Search this Thread|
|29th May 2020, 12:39 PM||motive sleep state: determine if a sim is sleeping #1|
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.
|17th Jun 2020, 3:02 PM||#2|
Join Date: Sep 2015
A Sim should be asleep when their sleep state < Literal 0x0000.