GuidedInTravelState : AccompanyingInTravelState
[Previous] [Main] [Next]

The GuidedInTravelState is the version of AccompanyingInTravelState for use with the GuidedTourState. According to the comments in the library code, it is:

A subclass of the basic accompanying travel state specifically designed for guided tours. This is almost the same as the basic accompanying travel state, but provides customized messages to describe the departure of our associated actor, which is the actor serving as the tour guide.

This is how we might customize the messages from the last stage of Sarah's brief guided tour, making use of the GuidedInTravelState:

+ sarahGuide4 : GuidedTourState
  stateAfterEscort = sarahTalking
  escortDest = lakeDoor
  arrivingWithDesc = "{The sarah/she} walks briskly over to the door,
   then stops to wait for you. "
  stateDesc = "She's waiting for you by the door. "
  specialDesc {inherited; stateDesc; }
  escortStateClass = sarahGuidedState

class sarahGuidedState : GuidedInTravelState
    "{The sarah/she} goes out through the door. ";
 specialDesc = "{The sarah/she} stops by the lakeside and starts
   searching the ground once more. " 

Note that we have to override sayDepartingThroughPassage(conn) here because Sarah will be going through the door.