GuidedTourStateclass

extras.t[2402]

Superclass
Tree

Subclass
Tree

Global
Objects

Property
Summary

Method
Summary

Property
Details

Method
Details

Guided Tour state. This provides a simple way of defining a “guided tour,” which is a series of locations to which we try to guide the player character. We don’t force the player character to travel as specified; we merely try to lead the player. The actual travel is up to the player.

Here’s how this works. For each location on the guided tour, create one of these state objects. Set escortDest to the travel connector to which we’re attempting to guide the player character from the current location. Set stateAfterEscort to the state object for the next location on the tour. Set stateDesc to something indicating that we’re trying to show the player to the next stop - something along the lines of “Bob waits for you by the door.” Set arrivingWithDesc to a message indicating that we just showed up in the current location and are ready to show the player to the next - “Bob goes to the door and waits for you to follow him.”

class GuidedTourState :   AccompanyingState

Superclass Tree   (in declaration order)

GuidedTourState
AccompanyingState
ActorState
TravelMessageHandler
`                                 object [ActorTopicDatabase](../object/ActorTopicDatabase.html) [TopicDatabase](../object/TopicDatabase.html)                                         object`

Subclass Tree  

(none)

Global Objects  

(none)

Summary of Properties  

escortActor escortDest escortStateClass stateAfterEscort

Inherited from ActorState :
autoSuggest getImpliedConvState isInitState location stateDesc stateSuggestedTopics

Inherited from ActorTopicDatabase :
askForTopics askTopics commandTopics giveTopics initiateTopics miscTopics showTopics specialTopics tellTopics

Inherited from TopicDatabase :
limitSuggestions suggestedTopics topicGroupActive topicGroupScoreAdjustment

Summary of Methods  

accompanyTravel getAccompanyingTravelState

Inherited from AccompanyingState :
beforeTravel

Inherited from ActorState :
activateState afterAction afterTravel arrivingTurn arrivingWithDesc beforeAction construct deactivateState distantSpecialDesc endConversation getActor getNominalTraveler getSuggestedTopicList getTopicOwner handleConversation initializeActorState justFollowed notifyTopicResponse obeyCommand remoteSpecialDesc showSpecialDescInContents specialDesc specialDescListWith suggestTopicsFor takeTurn

Inherited from TravelMessageHandler :
sayArriving sayArrivingDir sayArrivingDownStairs sayArrivingLocally sayArrivingThroughPassage sayArrivingUpStairs sayArrivingViaPath sayDeparting sayDepartingDir sayDepartingDownStairs sayDepartingLocally sayDepartingThroughPassage sayDepartingUpStairs sayDepartingViaPath sayTravelingRemotely

Inherited from ActorTopicDatabase :
initiateTopic showTopicResponse

Inherited from TopicDatabase :
addSuggestedTopic addTopic addTopicToList compareVocabMatch findTopicResponse handleTopic removeSuggestedTopic removeTopic removeTopicFromList showSuggestedTopicList

Properties  

escortActor

extras.t[2414]

the actor we’re escorting - this is usually the player character

escortDest

extras.t[2404]

the travel connector we’re trying to show the player into

escortStateClass

extras.t[2424]

The class we use for our actor state during the escort travel. By default, we use the basic guided-tour accompanying travel state class, but games will probably want to use a customized subclass of this basic class in most cases. The main reason to use a custom subclass is to provide customized messages to describe the departure of the escorting actor.

stateAfterEscort

extras.t[2411]

The next state for our actor to assume after the travel. This should be overridden and set to the state object for the next stop on the tour.

Methods  

accompanyTravel (traveler, conn)OVERRIDDEN

extras.t[2430]

we should accompany the travel if the actor we’re guiding will be traveling, and they’re traveling to the next stop on our tour

getAccompanyingTravelState (traveler, conn)OVERRIDDEN

extras.t[2439]

get our accompanying state object - we’ll create an instance of the class specified in our escortStateClass property

TADS 3 Library Manual
Generated on 5/16/2013 from TADS version 3.1.3