initiateConversation
| [Previous] [Main] [Next] |
When copying this code make sure that the final line (the definition of the tCabal Topic) doesn't get mixed up with your objecty hierarchy; you might want it to move it to somewhere safe, such as the end of the file.
Note the use of the endConversation method in the second ConvNode to call a nested No command in the event of the player typing BYE; this way the code in the NoTopic is run whether the player leaves the ConvNode by typing BYE or NO. Note also that in order to make it work properly we have to give the first ConvNode a name property ('ghostQuestion') even though we entered it by referring to its object name (ghostNode).