Adult Types (continued)
Our behavior now says:
0 = which direction am I positioned? If I'm in position A, then go to 1
1 = Am I an adult? If so, let the Sim pass through.
2 = I'm in position A and the Sim is an adult. End my routine (True/False).
OR
0 = which direction am I positioned? If I'm in position B, then go to 3
3 = Am I an adult? If so, let the Sim pass through.
4 = Im in position B and the Sim is an adult. End my routine.
The behavior does what it is supposed to whether the door is in position A
or position B.
Time To Test
Click OK to get out of your behavior, and then SAVE your file and exit out
of IFF. Place a copy (not a clone) of your door in your Doors folder for safekeeping,
and then start the game and test the door. The best place for testing will be
the bathroom (bathrooms are just great when it comes to testing!).
Since this is a door for adults only, you will need to test with a family that
has children. Place the door in the bathroom, and then tell a child to go use
the bathroom. He/she should not be able to go through the door. If you place two
of these doors leading into the bathroom, the child will go from door to door
trying to fulfill the command given him.
The Global
I guess you guys are wondering how I knew to insert 364 in our Function box
for adults, right? Well, I ain't gonna tell ya on account I have a reputation
for being mean to maintain.
No? That won't wash? Okay then, folks. We are now going to take a look at one
of my favorite files — the Person Global. The file is replete with some
very interesting things, and I'm sure you're going to like it as much as I do.
But as always, I have a few words of caution for you before we touch the file.
Rule #6: Back up your GameData
directory frequently. Crashes can happen often when hacking objects. In fact,
I back mine up before I start on any major hack, especially those that warrant
my tackling the globals. Consider yourself warned.
|