Lopping off words after the first one typed

Hi helpful folk. Here’s what I’m trying to work out today.

Say I want the entering of some communication commands in my game to just produce a message explaining why they aren’t needed.

Here’s what I’ve done so far:

The problem is, if I type ‘tell john hi’, I get ‘I only understood you as far as wanting to tell.’ And of course this is the kind of thing a player is most likely to do.

What’s the most economical way to define these things and prohibit / lop off extra typed words in these circumstances so the parser just gets the original command (EG ‘answer’) and calls me a blabbermouth?

(The one that came to me so far involved having a list of the communication commands, and to check if the player typed something from the list in an ‘After reading a command:’ section, then use regular expression to zap the extra words in such case.)

If the goal is that talking to any of the NPCs to just redirects to the same response, I think what you want is:

Understand "tell [some text]" [...et cetera...] as being a blabbermouth.
and everything after the tell/ask/whatever just gets treated as text, not things.

…and if you’re just giving a warning, you don’t even need to create a blabbing action:

Understand "tell [some text]" [...et cetera...] as a mistake ("<Blabbermouth!>").


Oh hrm I could have sworn that you could only have one thing-understood per mistake line (so “Understand “tell [some text]” as a mistake” would have been fine but not Understand “tell [some text]” or “ask [some text]” as a mistake" would not have been) but apparently that’s not the case.

Anyway also, severedhand, pretend I said “tell [text]” not “tell [some text]” because only the former compiles.

Thanks a lot for the pointers, guys. I will try them out.