Ask/Tell not working (newbie, no code experience, please help)

Basically in the game I'm making I want to be able to have my character have a device for recording the things he says. Trouble is, I can't even get the thing to respond to a simple question with a printed message. I have made sure that the ask/tell function is switched on in the game features. I have followed the example in the tutorial with the Bob NPC as closely as possible but when I ask the device anything I get the response "I don't recognize that command." I've tried finding help online and on the other tutorial page about Ask/Tell. When I try to just make a new ask command it tells me that that command is already in the game. I'm really stumped on how to get it to work. The example seemed so simple? All other aspects of the tutorial and building the game have gone smoothly so I'm really bummed about this. I have 0 coding experience like I said so if you suggest a solution involving the code view please be patient with me as I try and figure it out. I am using the Desktop version of Quest. Is there any other information I can give to indicate what the problem is? If this is unclear please let me know.


What's the command you're typing when you test it?
It sounds to me like it isn't recognising it as an ask command for some reason; which could possibly be a problem with the command pattern.


@mrangel I type "ask VA for information". I have VA as an alias for the voice assistant,and information as the key word. Is there a way to check what the command pattern is?


There are two commands which may be invoked if the player's input starts with "ask":

  • The pattern for ask is ^ask (?<object>.*) about (?<text>.*)$
  • The pattern for tellto is ^(tell|ask) (?<object>.*) to (?<text>.*)$

So… to invoke the ask command, you need to enter "ask VA about information"

If you want the default ask command to allow "ask (NPC) for (topic)", you could add a line in your start script to change it:

ask.pattern = "^ask (?<object>.*) (about|for) (?<text>.*)$"

Actually… I think that it would make sense for "ask for" to be a separate command in a lot of games. But in this case, just changing the pattern should be all you need :)


That did it thanks! I'll be sure to double check command patterns from now on.


Log in to post a reply.

Support

Forums