|Long name:||Object Functions|
Each OBJD resource in an object will have an OBJf resource with a matching instance value. The OBJf resource contains all the object functions.Run Functional Tree, there is a "test only" option which runs the Guardian instead of the Action BHAV.
The init tree is called whenever an object is reset. This happens when the object is first being placed, and if "Reset" is chosen after an object error.
This is one of the ones you will likely always use.
The main tree is the initial point of entry for the object's main simulation. Parameters may be passed to main if the "create object" primitive specifies.
This is one of the ones you will always use, even if only to have an Idle instruction pointing back at itself.
The load tree is called whenever an instance of the object is loaded from a save file. It is only called if the "object version" instance variable is different from the corresponding variable in the object definition.
The cleanup tree is called whenever an object is about to be deleted, or if a person's interaction with the object had to be aborted.
The queue skipped tree is called if an interaction in a person's queue was deleted for any reason.
This tree is a last resort hook for object intersection tests. If all the normal intersection tests pass, this tree is called to determine if two objects are allowed to intersect. Parameter 0 is the id of the object that is being tested.
wall adjacency changed
This tree is called whenever the wall configuration around an object changed. At that time, the "wall adjacency flags" instance variable will indicate the new configuration.
This tree is called whenever the room id of an object changes. At this time, the "room id" instance variable will contain the new room id.
dynamic multi-tile update
If this function is defined for a multi-tile object, the object is "dynamic". This means that any time one is placed, it is joined with any neighboring objects. When the joining takes place, this tree is called for each object in the multi-tile group.
This tree is called any time the position of an object changes.
This tree is called when an object is removed from the world, either to be deleted or to be re-placed in the world.
This tree is called when the user clicks to place an object.
This tree is called just before an object is picked up by the user.
level info request
This tree is called when the "level info" button is pressed. May not be used in final game.
This tree is used by people who are looking for a place to drop food.
If this tree is defined for a portal object, then the object may be used to transfer a person from one room to another. If two such objects are part of the same multi-tile group and lie in different rooms, then a person will push the tree to go between the rooms.
If this tree is defined, then the gardener will use it to take care of the plants.
This tree is used by any person looking to wash hands.
This tree is used a person who is trying to prepare food.
This tree is used by any person trying to cook food.
This tree is used by a person who is looking for a surface on which to place an object.
This tree is used by a person looking to throw away an object.
This tree is used to eat an object. It is only used by the fridge to transfer control of the person to the food after it is created.
pickup from slot
This tree is used by a person to pick up an object.
This tree is used by a person who is looking to wash a dish.
This tree is used by a person who wants to find a surface suitable for eating.
This tree seats a person. If the tree is defined, the game considers the object to be a chair.
If a person is sitting and contained in an object, this tree must be defined so that the person may stand up.
This tree is used by the maid to clean objects.
This tree is used by the repair man to repair objects.
This tree is called in the current situation object when an event in the user interface occurs. The first parameter is the type of the event. The second parameter is the id of the event.
Used by OfB employees/business owners to restock certain items. Example can be seen on the bookshelf. (Was previously labeled as Dry Clothes)
Start Live Mode
This is called when ever live mode is reentered. It is not called after a simple pause.
Stop Live Mode
This is called when ever live mode is left. It is note called for a simple pause.
This tree is called so that the object can set links to the previous and next objects in a doubly-linked list of objects. The first parameter is the ID of the previous object in the chain or -1 if this is the first object. The second parameter is the ID of the next object in the chain or -1 if this is the last object.
This tree is called when the object receives a broadcast message from the message primitive.
This tree handles the transition from the idle-neutral pose, to the locomotion neutral pose if they are different at the beginning of a route. An example is of a toddler changing from sitting to crawling pose brefore routing.
This tree handles the transition from the locomotion neutral pose, to the idle-neutral pose if they are different at the end of a route. An example is of a toddler changing from crawling to a sitting pose brefore routing.
This tree checks if the routing goal is still available. Its called on the object that issues the goto command. For example if a sim is trying to route to a seat, and another sim gets there false, this call can return false, allowing the sim to stop and choose another seat.
This tree is called from a message handler tree, if the message receiver decides to actually handle the message.
Along Route Callback
This tree is called on the sim once per tile along the route, and can interupt it by returning false. This tree can be used to run idles while the sim is routing.
This tree is used by objects to advertise that they are interesting things to look at.
Called when object is reset on loading of lot. This should never happen in shipped game.
Called to choose objects to lookat along a route
When an object is walked over, this tree gets called.
Utility State Change
When a utility changes state, this tree gets called.
Set Model by Type
Called to change the model based on a type defined in the game code. The first parameter holds the model 'type'. e.x. Modular stair railing types: None | Left | Right | Both
Get Model Type
Called to get the model type as defined by the game code. e.x. Modular stair railing types: None | Left | Right | Both
Called before an object is killed.
Called before an object is "deleted" or "sold" by the player, even if the object is not immediately killed.
Just Moved In
Called on objects that have been created by moving in a sim that have objects they own from another lot.
prevent place in slot
Called on container object during placement test for placing in a slot; return true to prevent placement even when all other tests pass.
Added to make Paul B's life easier.
Object Updated by Design Mode
Called when Design mode updates an object, so we can set the correct state on it.