Gathering names with Simple Chat

Hi all,

I’ve been involved in writing a choose-your-own-adventure with Mark Tilford’s “Simple Chat” extension (there may be more appropriate extensions, like Adventure Book, but I inherited the project with a lot of work already done).

The intention is that the game will start by taking the player’s name, then launch them straight into a series of choices.
I’m gathering names with the example from the IDE, but what I’m finding is that something goes wrong with ending the game.

Without the text-entry to gather the name, all works fine.
With it, any “end the story” choice leaves the player at a command prompt - but doesn’t actually end the story until the player attempts another action (such as look) at which point the game ends immediately.

I’ve attached a very short test file that exhibits this (using release 6G60):

Any suggestions? I’ve tried using AdventureBook instead, moving the “reject the player’s command” (or repeating it) to before/after the “end the story” option and a few other things.

I was wondering if it was possible that the “reject the player’s command” isn’t firing until the player enters an actual command (i.e. not an option from the presented menu)? If so, is there a way around that?

Thanks
Locksley
Test.inform.rar (3.68 KB)

Try this instead:

[code]After reading a command when collecting names:
now the player’s name is the player’s command;
now the command prompt is “>”;
change the text of the player’s command to “look”.

Instead of looking:
run a conversation from Testnode;[/code]
What is happening in your version is that the player’s command gets rejected, so the game asks for another command. If you leave that line out, the parser will reject the command with an error message, and once again the game asks for a new command. In both cases, the every turn rules do not run, and the player’s death is not noticed by the game until the player enters a valid command.

Thank you Victor, that works like a charm. I’ll replace “look” with custom actions, since there will be a few times the player drops back to a command prompt and I need to get non-standard answers from them, but a quick test shows it working perfectly.