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!
Instructor
Original Poster
#1 Old 10th May 2021 at 1:53 PM Last edited by FloTheory : 10th May 2021 at 2:04 PM.
Default Nap in living chair mod
Hi all!

I'm making a mod to add the rocking chair nap interaction to living chairs. It works fine, except for one thing I don't understand. As you can see on the picture, when performing the nap animation on a living chair, sims suddenly turn backwards (why??).
They start and end the interaction correctly though o_0.

If anyone has a hint
Screenshots
Attached files:
File Type: 7z  FloTheory_NapInAllChairsV2.3.package.7z (8.3 KB, 41 downloads)
Advertisement
Virtual gardener
staff: administrator
#2 Old 11th May 2021 at 1:41 PM
Quote: Originally posted by FloTheory
Hi all!

I'm making a mod to add the rocking chair nap interaction to living chairs. It works fine, except for one thing I don't understand. As you can see on the picture, when performing the nap animation on a living chair, sims suddenly turn backwards (why??).
They start and end the interaction correctly though o_0.

If anyone has a hint
So in the middle of the interaction, it seems that they don't have a slot to snap to (or wel,, you're getting the slot, but you're not actually 'snapping' them to it  In this case it's a bit more complicated as these 'slots' are actually the IK targets. But EA got you covered :p

Now, first off, you do need to make sure you copy the SuffixX stuff from EA's Sit_Template jazz script. So, that looks something like this:

Code:
                Play "a2o_firePit_warmHandsLoop1_x" for "x"
                {
                    Actor "diningChair" Suffix "sitTemplateSuffix"
                }
In your case, diningChair would become chairliving
Then, it's just a matter of adding:

Code:
 base.SetParameter("SuffixX", seat.IKSuffix);
For reference as to how and why i'd suggest checking out 'SeatedChat'  My knowledge on seats isn't that amazing, except for having sims go to it and animate (which I actually did without the IK suffix stuff, so you could also just load in EA's sitting animation, like the idle sitting, and see if your animation is just rotated differently?) 

Also! Small tip, I made this same mistake with the Sewing table, but anything 'ExitReasons' I'd add in the 'doLoop' (or rather, NapLoop in your case ). Else if the code runs and the user eventually cancels the interaction, it won't do it  or the animation will still loop while the sim isn't considering using it anymore.
Instructor
Original Poster
#3 Old 11th May 2021 at 7:36 PM
Thank you very much for your answer Lyralei and for all the tips!

It was my first time looking at jazz files and all the tutorials related to state machine (including your tutorial, thank you for that!)
I still have a lot to learn. When you say "(..) you do need to make sure you copy the SuffixX stuff from EA's Sit_Template jazz script.", do you mean I need to add a jazz file to my mod?
And then add this line to my C# script :
Code:
	
base.SetParameter("SuffixX", seat.IKSuffix);
Virtual gardener
staff: administrator
#4 Old 12th May 2021 at 10:58 AM
Quote: Originally posted by FloTheory
Thank you very much for your answer Lyralei and for all the tips!

It was my first time looking at jazz files and all the tutorials related to state machine (including your tutorial, thank you for that!)
I still have a lot to learn. When you say "(..) you do need to make sure you copy the SuffixX stuff from EA's Sit_Template jazz script.", do you mean I need to add a jazz file to my mod?
And then add this line to my C# script :
Code:
   
base.SetParameter("SuffixX", seat.IKSuffix);
Yep! In your case however I'm wondering if you can just get away with setting that parameter anyways without any Jazz changes, i'd check that out first. If that doesn't help, then I'd say, making a new jazz script is probably necessary (or making a 'new' one but instead, you're changing the sit-template one, change the state machine name to something like Sit_Template_FloTheory and add your napping state to it  )

because the napping is the one from the rocking chair, right?
Instructor
Original Poster
#5 Old 12th May 2021 at 2:39 PM
Quote:
"the napping is the one from the rocking chair, right?"


Yes it is! Thanks for the answer, I'll try what you said.
Instructor
Original Poster
#6 Old 21st Jul 2021 at 8:57 PM
Finally I went for the napping on chair animation from University and it's working fine with a Jazz script!
Screenshots
Forum Resident
#7 Old 21st Jul 2021 at 10:43 PM
Quote: Originally posted by FloTheory
Finally I went for the napping on chair animation from University and it's working fine with a Jazz script!


I can't tell you how long I've wanted this exact thing! (I'm a simple guy lol).

It looks great Flo!

You have been chosen. They will come soon.
Instructor
Original Poster
#8 Old 22nd Jul 2021 at 8:23 AM
Hey thank you Jathom95 ! The funny thing is
that I only learned this sleeping animation from University existed yesterday

But it doesn't exist for children, I'll be looking at how to convert adult animations to children with Blender.
Instructor
#9 Old 9th Aug 2021 at 4:01 AM
Quote: Originally posted by FloTheory
Finally I went for the napping on chair animation from University and it's working fine with a Jazz script!


Are you going to release this mod?
Instructor
Original Poster
#10 Old 12th Aug 2021 at 10:45 PM
Hi t888, it will be part of the Just Sit mod.
Back to top