I’m working with Inform 7 6M62 and I’ve found myself in need of the ability to have the parser recognize a range of possible user input paired with the action ‘say’ as requiring common handling. The code I have at the moment is as follows:
Understand "*creativity*" as "[creativity control]". After answering Nuvi that "[creativity control]" for the first time: now Nuvi is ready to ride; [todo: how can we examine the exact string the user gave and then respond appropriately here?] say "all right then, off we go!"
This compiles, but saying ‘creativity’ or any string containing ‘creativity’ does not trigger the expected response. I see from this answer that a raw command can be parsed for substrings, but I’m not sure how I would adapt this example to a case where I want to specifically apply handling for the ‘say’ action.
How can I use substring matches for text substitution variables? If that’s not possible, how can I detect a substring within the string argument given to the ‘say’ action and apply the ‘for the first time’ modifier?
Also, how can I access the full input argument to ‘say’ from within the handler?