Commands Tied to Functions in Objects All commands except a very few special cases are defined by the objects. All commands have a simple basic way to be recognized. The first word of the sentence is supposed to be the verb. Every command defined is tied to a special function in an object. Commands are defined with the function add_action(), which specifies the verb to be recognised, and the name of the local function to be called [See add_action, in the LPC Reference Manual]. When a living object gives a command which matches a verb with a command defined by an object, then the corresponding function will be called in the specified object. If this function returns 0, then next command with the same verb is tried. If the function returns 1, then he search is terminated. This enables several objects to define commands with the same verbs, but still behave different if the rest of the sentence differs. For example, there might be two armours. One is named leather jacket, and one is named plate mail. Both objects will have defined a command with the verb wear. If the player now gives the command `wear jacket', then we can't know which defined command is called first. Suppose that the wear function in the plate mail is called first. It will then detect that the argument to wear is jacket, not plate mail. It would then return 0, which would enable the game driver to call the command in the leather jacket that defines the wear verb. This function would accept the command, and execute some appropriate code, followed by a return of 1. Every time an object O comes in contact with a living object L then O will be asked to define commands.