I am clearly not understanding something about reading a command

Hi! I have been trying to find the answer to this for over a day now and I am finally caving and asking for help. I’ve read through the documentation and thought I understood this but clearly I do not.

My husband, while play testing the start of my game, typed “am I dead?” and I wanted to code in a bunch of snarky responses to questions like that, so, I put this into my code…

Dead is an action applying to nothing.
Dead is a kind of value. The dead are die, expire, death, perish.

After reading a command:
remove stray punctuation;
if the player’s command includes “dead”, say “You’re not dead yet.[line break]Do you 	feel happy?[line break]Would you like to go for a walk?”;
reject the player's command.

And it works great… until you try to do anything else. After deliver the response it just allows you to type in commands endlessly without any response from the game. How do I get it to kick the game back into action after delivering the response? When I remove the reject bit at the end it adds the good ol “That’s not a verb I recognize” at the end of it.

Any help would be much appreciated. I’m sure I am doing something stupid to something which should be super simple. Thank you so much!

You need to put the “reject the player’s command” inside the “if” statement. Right now it’s rejecting the command whether or not it contains “dead”.

After reading a command:
    remove stray punctuation;
    if the player's command includes "dead/die/expire/death/perish":
        say "You're not dead yet.";
        reject the player's command.

I am going to warn you, though, like I warn everyone, that this is a bad idea for anything other than snarky responses. If you want any of these things to actually affect the world, make them actions instead.

Is this a good place to use “understand as a mistake”? Or maybe it isn’t, because you want anything including the word “dead” to trigger the response…

This solved it. So, just me making a new user mistake. Thank you so much! That makes sense. I don’t know why I didn’t realize it.

And I am only planning to use this for snark. :slight_smile: