WEEK 4: Adding New Behaviors and Menu OptionsA New Way of Adding Moods (continued)Alright then. We don't want to inject bladder increase at the point of snap or the break point. Therefore, the only logical place available to us is right after Animate Sim (reset). Let's do it. Right click on Line 11, and select "Duplicate" from the menu. We are selecting duplicate, because the return lines will already be in place (12, 11). Now we have a total of 35 lines of code, with our duplicated line being #35. Click Line #35 and let's modify the Data box for the Line.
We want Line #35 to read: my motives Bladder += 40. Any more than 40 and you'll have a problem trying to keep your Sim out of the chair. But you can experiment later, if you feel like it. Make your Data box look like mine:
Let's go over the Data box, to make sure we understand what we've done. Function: 2 Is an expression ( my motives ) that will be defined by Parameters 1 through 4. Parameter 1: Defines the mood, in this case 9 for bladder. Parameter 2: Defines how much of Parameter 1 to inject. We say "inject" because unlike the hunger mood we tied in earlier, where it increases gradually up to a certain point, this one is a one time shot when the Sim sits. Everyone understand this? Parameter 3: Tells it to ADD. 768 = Add. You might want to write that into your Code Book, probably under a heading of "Parameters". Parameter 4: The 1806 gives you "my motives" and you should take a minute to write this into your Code Book as well.
|