Replies: 64 (Who?), Viewed: 13776 times.
Page 2 of 3
Mad Poster
Original Poster
#26 Old 4th May 2018 at 7:51 PM
This is how i had it set at some point, except for the z and angle part. lol Like you, even though SmugTomato explained it, I cannot seem to visualizing it.
I know the opposite of 180 would be 0, but then the z was negative, and according to the twin bed, both e and w routine slot have the same +/-. Both are positive
trying with z - and angle 0, my game crashed. lol.
So OK! I'll try that new routine slot value you gave me.
Thank you.

Je mange des girafes et je parle aussi français !...surtout :0)

Find all my old MTS Uploads, on my SFS, And all new uploads Here . :)
Mad Poster
Original Poster
#27 Old 4th May 2018 at 8:06 PM
OH!!!!! These new values worked perfect for the new routine slot yay!
Though, he still enters by the other side. So now, the container slot...
Oh, and he can't get out. lol

Je mange des girafes et je parle aussi français !...surtout :0)

Find all my old MTS Uploads, on my SFS, And all new uploads Here . :)
just a girl
#28 Old 4th May 2018 at 8:21 PM
What do you mean, he still enters by the other side? Through toys?

As for getting out, he probably tries to use #0 slot to get out, and if it's blocked, he can't. You'd have to add a line to try slot #1 into the BHAV. Also, animations might need flipping to correspond with the side the sim gets in and out from. This time it's harder for me to say without seeing it in game.

By the way. Doesn't the bed's roof poke through the wall?
Mad Poster
Original Poster
#29 Old 4th May 2018 at 8:28 PM
Yes. Bed roof poke through the wall, I still need to fix this, as it is a big wider than the pet cushion it is cloned from.
By entering from the other side, I mean, toddler will flip/warp to the other side of the bed to enter. Because the container slot points toward that side, so i guess the anim is also towards that point.
So i am now trying different values, for the new container slot.
This is funny, my second try(just now) the toddler zapped to the roof side, and entered by there. he ended up sleeping sideways, with his head sticking out. lol
Oops, wrong rotation...
I'll go try something else.

Je mange des girafes et je parle aussi français !...surtout :0)

Find all my old MTS Uploads, on my SFS, And all new uploads Here . :)
Mad Poster
Original Poster
#30 Old 4th May 2018 at 8:41 PM
OH!!!! Look who's got it working!

And since my game hates prt scr at times, it decided to crash when I hit it. So I did not see what happens next...ahah!

Je mange des girafes et je parle aussi français !...surtout :0)

Find all my old MTS Uploads, on my SFS, And all new uploads Here . :)
just a girl
#31 Old 4th May 2018 at 8:44 PM
Well, good luck. I know what you're going through

First container slot's rotation is 90 degrees with Z=-1, so I would think you have to make the new one with 270 degrees with Z=-1 (turn around 180 degrees). As for translation, I'd say X -0,139281, Y -0,518605, Z 0,191036.
Mad Poster
Original Poster
#32 Old 4th May 2018 at 8:46 PM
Well, he entered on a positive z 1 at the same 90 degree angle. Translation untouched.
I wonder now, if he will sleep with his head left, or right, but my game crashed so...I'll let you know in a minute
Minute passed..
So he sleeps in a mirrored position, just like when you turn the ped bed the other way. I am not surprised. trans need editing a bit, because his head is sticking out of the bed.
If I could mirror the sleep anim, it would be great...but how can I mirror just that instance? I do not want it mirrored when he uses the other side...
Otherwise, I'll just leave it as is. Sleep that way if it pleases you.

Je mange des girafes et je parle aussi français !...surtout :0)

Find all my old MTS Uploads, on my SFS, And all new uploads Here . :)
just a girl
#33 Old 4th May 2018 at 8:50 PM
How about moving routing slot a bit? It'll look better (less painful), if sims use this notch to get in.

Now the X is -0,005402. I'd try -0,205402, maybe.

Mad Poster
Original Poster
#34 Old 4th May 2018 at 8:56 PM
Yes! I saw that too. Though you have to admit that his little shin fit just right on the edge
But yes, I'll try that value.
Me be back.

Je mange des girafes et je parle aussi français !...surtout :0)

Find all my old MTS Uploads, on my SFS, And all new uploads Here . :)
just a girl
#35 Old 4th May 2018 at 9:06 PM
I think, you can make both container slots face the same direction, so that a sim sleeps with his head towards bed's head. Then you have to edit the BHAV to make two versions for animations - normal and flipped. Each pair of slots should have their own versions of animations, so to speak. If you get what I mean. How I'd do it: depending on the slot used by sim to enter the bed, I'd store a number in a new local variable, so that the interaction remembers it from the beginning to the end; then every time it comes to animations, I'd check this variable to choose normal or flipped animation.
Mad Poster
Original Poster
#36 Old 4th May 2018 at 9:16 PM Last edited by Rosebine : 4th May 2018 at 9:49 PM.
That first bit I get.

Quote:
Originally Posted by Lamare
... How I'd do it: depending on the slot used by sim to enter the bed, I'd store a number in a new local variable, so that the interaction remembers it from the beginning to the end; then every time it comes to animations, I'd check this variable to choose normal or flipped animation.

That second bit with the variable, I don't get..unless you mean by that, Option 2 - flip in temp 3?

And that -0,205402 value made the interaction impossible. The toddler route to it, then stop and has a X in his thought bubble. So I'll start ms3D and look at my bed again.
Sorry! My bad. Copying what you said in here, changed the comma into a period, or the other way around anyway. SimPE only accept one of them..so it kept changing to another value.
ugh...I'll go back.
Okay, so changing the value of the routine slot helps but not. Because the container slot still has the same, so container values needs to change as well. I'll have to find the perfect alignment, finally.

Je mange des girafes et je parle aussi français !...surtout :0)

Find all my old MTS Uploads, on my SFS, And all new uploads Here . :)
Mad Poster
Original Poster
#37 Old 4th May 2018 at 10:30 PM
Almost there!
The Routine is almost centered, the container is almost centered, though both needs to be squished towards eachother..
And the sleep is fine. Will be even better when flipped.
Pic 1 for the routine,
pic 2 for the container,
pic 3 for the comparaison. To be perfect, the toddler should be in the same position..
and pic 4 is sleeping.
Pictures have been edited because it was night time and we can't see good.
I'm getting there thanks to youz.
Time for a break, I'm hungry.
Screenshots

Je mange des girafes et je parle aussi français !...surtout :0)

Find all my old MTS Uploads, on my SFS, And all new uploads Here . :)
Mad Poster
Original Poster
#38 Old 5th May 2018 at 7:42 PM Last edited by Rosebine : 5th May 2018 at 8:50 PM.
So! both new Routine and container slots are now perfectly alligned. It was easier than I thought...(once you know. lol)
If I wanted a bed enter-able by one side and getout-able by the other I am done. No weird clippings or animations, looks natural.
On to the next step now, adding a get out by the new getIn side...

Je mange des girafes et je parle aussi français !...surtout :0)

Find all my old MTS Uploads, on my SFS, And all new uploads Here . :)
just a girl
#39 Old 5th May 2018 at 9:05 PM
Was the squishing successful? It may help to look at translation coordinates of original container and routing slots (X axis) and note the difference. The same difference might work for new pair of slots.

About the variable. The idea is to record what slot was used by the sim to get in and use that information to control further events, i.e. which animation to choose. You can use Local 1 for it, as Local 0 is already used for something else. It can go like this:
If sim's attempt to use slot 0 was successful, write "Local 1 := 0". If not, sim tries slot 1, and if that is successful, write "Local 1 := 1". Now the BHAV stores this info in Local 1 and you can check it and use it. There are a few ways how you can go about flipping animation. The shortest in this situation would be, I think, this:
After the line 4 and before playing getting in animation, insert a line "Temp 3 := Local 1". Then tick on Flip Flag in Temp 3 for this animation. Now the flipping will depend on Temp 3, which depends on Local 1, which depends on what slot is used. Perfect.
A) Sim used original slot -> Local 1 equals 0 -> Temp 3 equals 0 -> Flip flag is 0 -> Animation is not flipped
B) Sim used new slot -> Local 1 equals 1 -> Temp 3 equals 1 -> Flip flag is 1 -> Animation is flipped
Assuming that flip flag 0 is not flipped and flip flag 1 is flipped (I think it is), the logic works out nicely.
Next up. I don't think sleeping animations need flipping, so don't tick Flip Flag in Temp 3 for those. I don't know about sitting and waking up animations.
Getting out probably needs flipping. But before that we have snapping into slot on line 16, and we need to rewrite Local 1 according to what slot the sim will use this time to get out (because he might not use the same one as he used to get in). Same as before: if sim's attempt to use slot 0 was successful, write "Local 1 := 0"; if not, sim tries slot 1, and if that is successful, write "Local 1 := 1". After that and before the getting out animation, insert a line "Temp 3 := Local 1" again and tick Flip Flag in Temp 3.
Before saving, don't forget to change Local Var Count to 0x02 at the head of the BHAV.

For this plan to work, rotation angle of the new container slot should be the same as the original. If you leave the new slot rotated 180 degrees compared to original (as it looks on your latest pick), animation flipping is not needed. Because rotation is what makes a sim turn head to toes, not the flipping. But the flipping is needed when a sim approaches container slot from a different side. From the right side he turns right, so he has to turn left from the left side to lay down in the same direction. I think, it'll work.

I hope I don't make it all sound harder than it is.
Mad Poster
Original Poster
#40 Old 5th May 2018 at 9:46 PM Last edited by Rosebine : 5th May 2018 at 10:36 PM.
The squishing went perfectly! lol
Turns out, my new container slot's x trans needed to have the same value, but negative. (same as original container slot)
For my new Routine slot, it was the y trans that needed to be the same, but negative.(same as y of the original routine slot)
As it is now, the anims are perfect regardless of which side my toddler gets in, and I am so happy about this...wanna try? lol
The rotation of my new container as -z, while the original has a positive value. So plan won't work. But all seems normal, I would leave it be.

you said :
If sim's attempt to use slot 0 was successful, write "Local 1 := 0". If not, sim tries slot 1, and if that is successful, write "Local 1 := 1"
I write this where? Do I need to add a new line between stuff to fit a..[prim 0x0002] Expression (Local 0x0000 := Literal 0x0001) instead of pointing it to a true?
Also :
After the line 4 and before playing getting in animation, insert a line "Temp 3 := Local 1". Then tick on Flip Flag in Temp 3 for this animation. Now the flipping will depend on Temp 3, which depends on Local 1, which depends on what slot is used. Perfect.
A) Sim used original slot -> Local 1 equals 0 -> Temp 3 equals 0 -> Flip flag is 0 -> Animation is not flipped
B) Sim used new slot -> Local 1 equals 1 -> Temp 3 equals 1 -> Flip flag is 1 -> Animation is flipped
Assuming that flip flag 0 is not flipped and flip flag 1 is flipped (I think it is), the logic works out nicely.
I can follow this, but instead of after line 4, since get in works well as it is now, I could use this trick before the get out?

Je mange des girafes et je parle aussi français !...surtout :0)

Find all my old MTS Uploads, on my SFS, And all new uploads Here . :)
Mad Poster
Original Poster
#41 Old 5th May 2018 at 10:53 PM Last edited by Rosebine : 6th May 2018 at 11:01 PM.
Ok...now I am just confused. lol
The way i set the behav, is that if the first Go To routine is true, all goes normally. if it is false, then it goes to the other Go to routine Line I added, that then points to my new routine slot. Which then goes to my snap into line I added, which points to my container slot. And then all goes back up, to line 4, where the sleeping happens as normal.
So i really wonder where to place a Temp, and then what to do afterwards.
I will post my new edited one that works for getting in by the other side. maybe you can look at it and tell me where to add stuff...
This version is before i attempted the Temp, variable, local..because when i did, I'm sure I messed up.
Oh!! and of course, if ever you need to try in game, you'll need my Twin bed for the toddler bed to show up, so i am posting it too...

Je mange des girafes et je parle aussi français !...surtout :0)

Find all my old MTS Uploads, on my SFS, And all new uploads Here . :)
just a girl
#42 Old 6th May 2018 at 12:12 PM Last edited by Lamare : 6th May 2018 at 12:42 PM. Reason: bb-code
If you're Ok with sim sleeping this way



then forget about what I said in post #39. You shouldn't have to flip the animations, if the slot is rotated the way it is now.
Mad Poster
Original Poster
#43 Old 6th May 2018 at 5:54 PM
Once I'll succeed in getting him out of bed by the same side he entered, then maybe I'll afford to mind. lol
All my tries were in vain. Everything is fine until the wakeup animation is done. Then he stand up in his bed, idle...and I must move him out using moveobjects on. (if the original side is still blocked, otherwise, he uses it no trouble)
He refuses to follow my edits of the behave.
Between the wakeup anim and the get out one, there are 2 lines. snap(slot number) and snap away(flip sim around). The wake up true and false target both points to snap(slot number)
So, I made the false point to a new snap(slot number, mine) and then go to get out.
problem is, it is not like there is something stopping the toddler to snap here or there, so my new line never gets chosen.
Well, I assume this is what is happening.
So yeah, the variable temp thing would be nice here, but i am afraid i do not understand or know enough to make it work.
But I will work on this more, I am almost there...

Je mange des girafes et je parle aussi français !...surtout :0)

Find all my old MTS Uploads, on my SFS, And all new uploads Here . :)
just a girl
#44 Old 6th May 2018 at 6:34 PM
The getting out thing. I would think, what you have to do is look at line 16:
Code:
[prim 0x002E] Snap (slot number 0x0000,
  from slot in temp 1: False,
  ask person to move: False,
  TEST ONLY: False)

And change it to "TEST ONLY: True". This way, this line would be a check if the slot is available. I have never dealt with this primitive, so I'm not sure how it works. There seems to be no wiki article on the Snap, so trial and error it is! Ok, I played with operands*, and found out - if you set operand 4 to 10, it would change it to test:
Code:
[prim 0x002E] Snap (slot number 0x0000,
  from slot in temp 1: False,
  ask person to move: False,
  TEST ONLY: True)


So, that's that. Line 16 is now a test to see if slot 0 is Ok for snapping. If it is, it returns true and you have to lead it to the actual snapping (with TEST ONLY: False). If it returns false, lead it to test for the slot #1, and again - if the test returns true, go to snapping to slot #1. What if both tests fail? Maybe someone stands in front of the bed and blocks the path, but will go away in a few minutes. It's not the best idea to just remove "in use" flag and finish the interaction the way it's done now. I mean the sim is stuck. I would insert "Idle" function, so that the sim waits for 30 ticks and tries to get out again.

*This is how you count operands:
Mad Poster
Original Poster
#45 Old 6th May 2018 at 6:44 PM Last edited by Rosebine : 6th May 2018 at 7:15 PM.
Ok! Thank you, I'll try that.
Ahahahah( <--------my computer is suggesting Yamaha instead..)!!
Well now, he gets out alright, but in the wrong direction, so he is still in bed and stuck...I video-ed it, it's funny.
https://youtu.be/RSSF-QjFkm4

Je mange des girafes et je parle aussi français !...surtout :0)

Find all my old MTS Uploads, on my SFS, And all new uploads Here . :)
just a girl
#46 Old 6th May 2018 at 7:37 PM
Let's see how it's done by regular beds then. Single beds have two sides that can be used to get out, so they must have a working procedure for such case.
Mad Poster
Original Poster
#47 Old 6th May 2018 at 7:40 PM
Yes. I have peaked into it a lot...but at the same time, there are 3 tile objects, and have much more options on them, not counting that their behav is global, and hard to reach/see.

Je mange des girafes et je parle aussi français !...surtout :0)

Find all my old MTS Uploads, on my SFS, And all new uploads Here . :)
just a girl
#48 Old 6th May 2018 at 8:00 PM
It appears, they don't use tests for regular single beds. If Snap returns false, they change slot number to the other side and try again.
(Looking at BHAV 0x2091 - Routing - Get Out - from Bed globals)
Quote:
So, I made the false point to a new snap(slot number, mine) and then go to get out.

Would you show me how you did this part? The file I have doesn't have it yet.

Also, on the line 1, there's a bug:
[prim 0x002D] Go To Routing Slot (Param 0x0000)
It should be Literal slot 0:
[prim 0x002D] Go To Routing Slot (0x0000)
(I even know how it got messed up. Every time you use the wizard for the Go To Routing Slot primitive, it changes items in the little drop-down list. Sneaky wizard )
Mad Poster
Original Poster
#49 Old 6th May 2018 at 8:07 PM
I deleted it, it didn't work. In fact, changing the test false to test true, made both side unavailable for get out...not only the new side.
The package you have is the template I use. I keep a copy, cause it works for the get in. Then, I paste a copy in my DL, and run tests on it. When it fails, I delete and start again with the template.
Ok, I changed it from temp to Literal. (line 1)
What will this change though? because the toddler seemed to have no trouble..and this is the original line, not the one I added.

Je mange des girafes et je parle aussi français !...surtout :0)

Find all my old MTS Uploads, on my SFS, And all new uploads Here . :)
just a girl
#50 Old 6th May 2018 at 8:18 PM
Yes, it is the original line, but it got messed up without you noticing it. You can compare it to one of the earliest versions and see for yourself. It's important to watch out for that wizard =)
Let's try this again: "So, I made the false point to a new snap(slot number, mine) and then go to get out."
Page 2 of 3
Back to top