WEEK 4: Adding New Behaviors and Menu OptionsParameters (continued)These bits of information can be passed to other behaviors when it is run as a statement or a private. If values have not been assigned to the parameters of the [priv] statement (In other words if you have entered -1 in all four parameter fields AKA ff in all 8 hex boxes) they will inherit the values of Temp Storage 1 through 8. Like Local Variables, Parameters must be declared in the BHAV's Header frame in the upper right hand corner of the Behavior Editor window ConstantsConstants: Constants are numerical values stored within an .iff file itself. They're read only, so unlike the variables their value does not change as the program is run. Constants are stored in the BCON section (resource) of an object. We can add to the Constants already found in the object, we can modify the existing ones, or we can delete them; and indeed, Constants are the easiest to work with.
A NEW WAY OF ADDING MOODSEarlier we added hunger to the chair by linking the mood to our existing comfort lines. As some of you might have noticed, bladder decreased as hunger increased. We will now attempt to balance things out by injecting a bit of "bladder" into the chair in a completely different way. Open IFF, and bring in the cheap chair. Go into the BHAV section; we want to place the bladder increase at the correct point of action, and the correct point of action, logically speaking, should be while the Sim is sitting and before the Sim gets up from the chair. It wouldn't do at all if bladder increased after the Sim rose and left the vicinity of the chair. Or before he sat down. Find Behavior #4099 "Sit Core". If you'll think back to earlier lessons, that is where your Sim is instructed on how to enter the chair for sitting. It's the long and yucky behavior, so right click anywhere in there to "rewrite" the lines of code.
|