Welcome to
Mod The Sims
Online: 2277
News:
Have an account? Sign in:
pass:
If you don't have an account, why not sign up now? It's free!
Other sites: SimsWiki

Hi, Unregistered! Still using Blue Game Style? Try out the new MTS theme, now in beta. Show me!
Reply  Replies: 2 (Who?), Viewed: 1214 times.
Search this Thread
Old 28th Mar 2010, 4:42 PM DefaultIs it possible to check whether another sim is in the room? #1
simsfreq
Original Poster

Lab Assistant

Join Date: Jun 2005
Posts: 75
Thanks: 914 in 9 Posts
5 Achievements


I am really stuck here, I hope someone can help.

I am working on an object which is cloned from the crib. The item is placeable over any bed and makes it appear that the baby or toddler is sleeping in the bed. This all works perfectly and looks very cute - but I would also like the mother to be able to "nurse" the infant in the night. So I need the baby's hunger to increase along with energy (or I thought I could just max it either every 2-3 hours or when the hunger hit a certain point), which seems pretty simple, I should be able to work that out (although I'm starting to think my brain just doesn't *get* programming, argh) but I thought that this was too simplistic, if the mother put the baby to bed and then went about her evening, I didn't want the baby's hunger to increase then - so I wondered if it was possible for the crib to check whether the baby's mother was in the room (because if she's in the room she's probably asleep in the bed too).

If it is not possible to check whether a particular sim is in the room (or any adult female would do), I was thinking that this hunger fulfilling state of the crib could be set manually, through a pie menu, would that work at all?
Old 29th Mar 2010, 10:19 AM #2
Echo
Duck



Join Date: Dec 2004
Posts: 3,918
Thanks: 48207 in 48 Posts
26 Achievements

View My Journal


It certainly is possible! The simplest way is simply to put the mother in "Stack Object" and run "Stack Object's room == My room".

If you want to be a bit more precise, you could then use the "Distance" command to find out just how far apart the mum object is from the baby object. If the distance is small enough, then you can assume they're close enough for nursing.
Old 30th Mar 2010, 5:01 PM #3
simsfreq
Original Poster

Lab Assistant

Join Date: Jun 2005
Posts: 75
Thanks: 914 in 9 Posts
5 Achievements


That is brilliant - thank you so much. It is good to know that what I want to do is possible - just need to do some more tutorials I think. I am struggling just trying to change the footprint of the object for starters.
Reply


Section jump:


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