WEEK 2: Enhancing MoodsAuthor: Grapholina
EXPLORING THE BEHAVIORS (BHAV) SECTION Open your Cheap Chair from last week in IFF, click on the "TTAB" section to select it, and then double click on the chair's description over to the right to open up the Tree Table window for the chair.
If you will remember back to last week's lesson, we determined this is the place to start when hacking any object, because it will show us where in the BHAV section to look for the action's behavior number. If we look in the Action Tree and Check Tree sections, we will find our starting point.
In this case, we need to move from here into the BHAV section, and find behaviors #4097 (action tree) and #4098 (check tree). If you think you'll forget these, write them down now so that you do not have to keep flipping back and forth between screens. Click "OK" to get back to the main window, locate BHAV, and click it once to select it. To the right, you will see all the behaviors associated with our chair (as well as some other chairs we really don't care about).
Find Behavior #4097 "Sit" and double click it to open it up.
Let's read this line to see what it is telling us. The far-most column is the "Line" column and this is where the lines of code are numbered. They all start with "0". The second column "Instruction" is the actual code interpreted for us into everyday English. The third column is for the "Next" instructions, also known as True/False lines or statements. The Next instructions in this behavior #4097 is quite flimsy since there is only one line of code in the behavior, but as we move along through our chair, we will see better examples. Right now, this line says: I want you to go to my Private Sit Function and follow the instructions there (sort of like a scavenger hunt). You can do this if my conditions for sitting have been met (the true statement, and the conditions is the stuff found in the Check Tree). If those conditions are are not met, then stop and don't do anything (the False statement).
|