They're Behaving Like Monsters! An Introduction to Stimulus-Based Behavior in Computer Role-Playing Games
Just Following Orders
One example of following orders is guarding a specific item or location. In this case, you would mark the area around the place or thing as "guarded," so the guard creature wouldn't roam too far off. The creature may even see something of interest in the distance, but won't go after it unless the desire becomes strong enough to outweigh the order. For some creatures, losing sight of the order issuer may lessen the strength of the order.
For pets or familiars, we would make more use of the boredom behavior (wandering). The desire behavior would point to the master, assuring that the creature wouldn't wander too far off. There would be a constant attraction to the master, which we could increase with distance, so that the creature might wander off but eventually would come back. For example, a dog might run after a small monster or a bird might investigate something shiny, but the dog will eventually return after catching the monster, or the bird will return after losing interest in the bauble or seeing something frightening.
Of course, a zombie (mindless undead, without any specific desires or hungers) will stay close to its master all the time, until it's ordered to kill.
Typically, a pet would emulate its master in terms of specific behaviors (attitudes toward other creatures, for example). With this approach, a pet dragon won't go around eating the other pets or servants while its master is off on an adventure. Of course, this doesn't mean that the pet won't get into trouble, especially if the master is gone too long.
Like all behaviors, this one is flexible and should be affected by other factors such as the intelligence, strength, and natural tendencies of the creature. A dragon might be more willful and thus harder to control than a mindless zombie. Another factor should be the length of time for which the creature has been a pet. In other words, the loyal dog (raised from birth) isn't likely to go insane and start attacking everything that comes near. On the other hand, a recently acquired hydra might see nothing wrong with attacking anything that crosses its path.
Determining how much control the master creature actually has over its followers (pets, familiars, slaves, etc.) could have a definite impact on the follower's behavior. This could range from complete mind control down to simple obedience or loyalty.