View Full Version : Animating a food processor

3rd Aug 2011, 1:13 AM
I'm in the process of trying to animate the blade of a stand mixer I want to function as a food processor.

Following Echo's tutorial I managed to create the custom animation and import it. After that, I imported the Anims Object text list and added the new animation to the text. Next I've been trying to figure out the lines I need to add to the bhav and where to add them. I've downloaded custom objects and cloned everything I could think of to figure out what the code should look like but I haven't had any luck--at best nothing happens and at worst my sims are frozen as soon as I buy the food processor.

In my latest attempt (and most promising I think...) I've imported Prep - Anim - Mix - Start from the food processor semi-globals thinking I could just plug in my animation into that, but that hasn't worked out any better than anything else I've tried. Can anyone help or point me in the right direction?

4th Aug 2011, 1:32 AM
Hmmm. For what it's worth, your "Anims - Object" text file has the original Group ID; it may need to be 0xFFFFFFFF.

Looking at a clone of the original food processor, my guess it that all of the magic happens with the OBJF. The "prep" Function (which is apparently called when a Sim is trying to prepare food) has an action BHAV and a Guardian BHAV. I think you may be on the right track with importing the BHAV, but you may need to go further. That BHAV is likely a smaller portion of a larger section of code. The semiglobals aren't going to recognize the package-dependent (i.e. Group ID 0xFFFFFFFF) BHAV, so you likely need to go up a level, importing the BHAV(s) which would use your custom BHAV which runs the new animation...

In other words, you might need to make your processor self-contained....such that you import and edit the "Function - Prep" BHAV (and any other BHAVs) from the semiglobals into your package then edit the prep Function's Action (and Guardian if necessary) in the OBJF to point to the BHAV(s) in your package. You may need to edit more OBJF functions; the "load" OBJF function of my "test clone" of a food processor points to a BHAV in the semiglobals which seems to manage the sound effects for the processor.

4th Aug 2011, 7:17 PM
Thanks so much for replying, MSD. I was going about this completely wrong from the beginning. I was thinking the hard part (and the part with the steepest learning curve) was creating the animation and since the movement I want is so elementary it seemed like the perfect beginners project. :faceslap:

After importing all of the semi-globals and seeing exactly what you're talking about, I realize I don't know nearly enough to attempt it without a tutorial showing something similar--there's just too much code and most of it is still Greek to me. Thanks again. :)