InConversationState : ActorState
| [Previous] [Main] [Next] |
· | attentionSpan - this is an integer giving the number of turns the actor should wait before giving up on the conversation. The default is 4. If the other character doesn't talk to the NPC for this many turns, the NPC will automatically terminate the conversation, switching to the next state. If you want the NPC's attention span to be infinite, set attentionSpan to nil.
|
· | nextState - this is an ActorState object, which should normally be of the ConversationReadyState class, which follows the conversation's termination. When we terminate the conversation, we'll switch to this state. You don't have to override this; if you don't, the game will remember the state that the actor was in just before the conversation, and switch back to that when the conversation ends.
|
· | endConversation (actor, reason) - Exit the in-conversation state. 'reason' indicates why we're leaving the conversation - this is one of the endConvXxx enums defined in adv3.h. This method is a convenience only; you aren't required to call this method to end the conversation, since you can simply switch to another actor state directly if you prefer. This method's main purpose is to display an appropriate message terminating the conversation while switching to the new state. If you want to display your own message directly from the code that's changing the state, there's no reason to call this. This returns true if you want to allow the conversation to end, nil if not.
|