WEEK 4: Adding New Behaviors and Menu OptionsA NEW WAY OF ADDING MOODS (continued)After the lines are re-written, we can read them easier, and you should be able to scan through until you find your beginning point which is your chair's GUID number. Mine is on line 15. You should see your GUID there.
Notice the line jumps to Line 16. Let's follow the trail to where the function ends for our chair. Follow closely, because there are other chairs involved here, and we don't want to add bladder to any of those. Line 15 jumps to Line 16, and that line instructs the chair as to which sound to play when a Sim sits (depending on the type of chair: metal, wood, etc.). We then jump to Line 9. Line 9 is instructing the Sim from where to enter the chair (entry flag 1 means from the front). Line 9 then jumps to Line 10.
Line 10 is instructing the Sim to be animated, and then jumps to Line 11.
When inserting bits of code into existing code, you should always make certain of where you are in the code. For all you know, this animation could be instructing your Sim to be sick or something, and therefore this would not be a good point to insert the add bladder command. Before we go to Line 11, let's stop here and check out the animation id 1 from object, to see what that is. "From object" means the animation is built into the object and not being called from a global outside the object.
|