Hello everyone,
I’ve been trying to do something in my game and I’m wondering if it is possible rework the “can’t see any such thing” parser error to make it specific to certain actions.
For example, if I wanted “Examine lampp” to return one response, but “Eat cheeese” to return a different one.
I’m running into some trouble. I’d rather not use “if the player’s command includes…” line, because that would make it difficult to refer to actions that have short synonyms (like “x” for “examine”).
I actually want to do this for some actions that I’ve created, because sometimes “You can’t see any such thing” doesn’t make a lot of sense with some of my custom verbs.
But I’ll stick to using standard actions for my examples to keep this simpler.
This is what I tried, but it didn’t work:
Rule for printing a parser error when the latest parser error is the can't see any such thing error:
if the current action is examining:
say "I'm not sure what you're trying to examine." instead;
otherwise:
say "You can't see any such thing." instead;
“Examine (gibberish)” just defaults to the “You can’t see…” response.
So I decided to try this, just to see what would happen:
Every turn:
if the current action is examining:
say "You saw it!";
That produced the correct response to “Examine me,” but not to “Examine (gibberish).”
So my assumption is that Inform is preventing a current action from being stored if there is a parser error. I think the documentation said something about waiting being the default current action. So, I tried this:
Rule for printing a parser error when the latest parser error is the can't see any such thing error:
say "[the current action]" instead;
That did produce “waiting” as the response to “x (gibberish).”
So, is there a way to do what I’m trying to do?