ConversationReadyStateclass | actor.t[4742] |
Superclass Tree | Subclass Tree | Global Objects | Property Summary | Method Summary | Property Details | Method Details |
Note that this state is NOT required for conversation, since the basic ActorState object accepts conversational commands like ASK, TELL, GIVE, and TAKE. The special feature of the "conversation ready" state is that we explicitly move the actor to a separate state when conversation begins. This is especially appropriate for states in which the NPC is actively carrying on some other activity; the conversation should interrupt those states, so that the actor stops the other activity and gives us its full attention.
This type of state can be associated with its in-conversation state object in one of two ways. First, the inConvState property can be explicitly set to point to the in-conversation state object. Second, this object can be nested inside its in-conversation state object via the 'location' property (so you can use the '+' syntax to put this object inside its in-conversation state object). The 'ready' object goes inside the 'conversing' object because a single 'conversing' object can frequently be shared among several 'ready' states.
class
ConversationReadyState : ActorState
ConversationReadyState
ActorState
TravelMessageHandler
object
ActorTopicDatabase
TopicDatabase
object
getImpliedConvState
inConvState
stateSuggestedTopics
Inherited from ActorState
:
autoSuggest
isInitState
location
stateDesc
Inherited from ActorTopicDatabase
:
askForTopics
askTopics
commandTopics
giveTopics
initiateTopics
miscTopics
showTopics
specialTopics
tellTopics
Inherited from TopicDatabase
:
limitSuggestions
suggestedTopics
topicGroupActive
topicGroupScoreAdjustment
enterConversation
enterFromConversation
handleConversation
initializeActorState
initiateTopic
notifyTopicResponse
showGreetingMsg
Inherited from ActorState
:
activateState
afterAction
afterTravel
arrivingTurn
arrivingWithDesc
beforeAction
beforeTravel
construct
deactivateState
distantSpecialDesc
endConversation
getActor
getNominalTraveler
getSuggestedTopicList
getTopicOwner
justFollowed
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
:
showTopicResponse
Inherited from TopicDatabase
:
addSuggestedTopic
addTopic
addTopicToList
compareVocabMatch
findTopicResponse
handleTopic
removeSuggestedTopic
removeTopic
removeTopicFromList
showSuggestedTopicList
getImpliedConvState OVERRIDDEN | actor.t[4753] |
inConvState | actor.t[4750] |
stateSuggestedTopics OVERRIDDEN | actor.t[4934] |
enterConversation (actor, entry) | actor.t[4899] |
enterFromConversation (actor, reason, oldNode) | actor.t[4815] |
Games shouldn't normally override this method. Instead, simply create a ByeTopic entry and put it inside the state object; we'll find the ByeTopic and show its message for the goodbye.
If you want to distinguish between different types of goodbyes, you can create an ImpByeTopic for any implied goodbye (i.e., the kind where the other actor just walks away, or where we get bored of the other actor ignoring us). You can also further differentiate by creating BoredByeTopic and/or LeaveByeTopic objects to handle just those cases. The regular ByeTopic will handle explicit GOODBYE commands, and the others (ImpByeTopic, BoredByeTopic, LeaveByeTopic) will handle the implied kinds.
handleConversation (otherActor, topic, convType) OVERRIDDEN | actor.t[4839] |
initializeActorState ( ) OVERRIDDEN | actor.t[4937] |
initiateTopic (obj) OVERRIDDEN | actor.t[4875] |
notifyTopicResponse (fromActor, entry) OVERRIDDEN | actor.t[4886] |
showGreetingMsg (actor, explicit) | actor.t[4783] |
>bob, hello
"Hi, there," you say.
Bob looks up over his newspaper. "Oh, hello," he says, putting down the paper. "What can I do for you?"
Note that games shouldn't usually override this method. Instead, you should simply create a HelloTopic entry and put it inside the state object; we'll find the HelloTopic and show its message as our greeting.
If you want to distinguish between explicit and implicit greetings, you can create an ImpHelloTopic entry for implied greetings (i.e., the kind of greeting that occurs automatically when the player jumps right into a conversation with our actor using ASK ABOUT or the like, without explicitly saying HELLO first). The regular HelloTopic will handle explicit greetings, and the ImpHelloTopic will handle the implied kind.