I have another Simple Chat question. I’m using the Forbid Conversation Exiting default, but at a certain point during the conversation, the game ends. Since normal conversation doesn’t take up any turns, the game doesn’t end until the conversation ends. What’s the best way to end the game right away?
I’ve done it here by deactivating every single chat node, but that seems dangerous and inefficient:
[code]Include Simple Chat by Mark Tilford.
Use default forbid exiting conversations.
Classroom is a room.
The key is in the classroom.
Teacher is a man in the classroom.
raise-hand, bathroom, and key-please are chat nodes.
Talking to is an action applying to one thing. Understand “talk to [someone]” as talking to.
Carry out talking to:
run a conversation from raise-hand;
Instead of giving text for raise-hand, say “‘Yes, student?’”
Instead of finding responses to raise-hand:
link to bathroom;
To say win:
repeat with c running through all chat nodes:
deactivate c;
End the game saying “What a relief!”
Instead of giving link to bathroom, say “‘May I be excused to use the bathroom?’”
Instead of giving text for bathroom when the player carries the key:
say “‘off you go, then!’[win]”
Instead of giving text for bathroom, say “‘Not without the bathroom key.’”
Instead of finding responses to bathroom:
link to bathroom;
link to key-please;
Instead of giving link to key-please, say “‘May I please take the key?’”
Instead of giving text for key-please, say “‘Go ahead.’”
[/code]