Author Topic: Waiting for Spoken Response not working?  (Read 1540 times)

lexsan82

  • Newbie
  • *
  • Posts: 2
Waiting for Spoken Response not working?
« on: December 04, 2020, 06:02:35 PM »
Can someone evaluate if I'm using this correctly? I have the time limit set to 0, and it does continue when I give a response. However, it remains at value Not Set. I have simplified the code down to Yes, and it still does not assign the value to the variable.

When I say: prepare to fight [a thargoid; a goid; thargoid; goid]

Say, 'Which Thargoid will you be fighting?'
Wait for spoken response: 'cyclops;basilisk;medusa;hydra'
Begin Text Compare : [goid] Equals 'hydra;medusa;cyclops;basilisk'
    Say, 'Goid recognized. Setting hearts.'
Else
    Say, 'Goid type error. Set to {TXT: goid}'
End Condition
Pause 5 seconds
Play back captured audio

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: Waiting for Spoken Response not working?
« Reply #1 on: December 04, 2020, 06:11:23 PM »
The way the command you're showing is set up, the condition would always evaluate to false, as the literal text returned by the spoken response cannot ever be "hydra;medusa;cyclops;basilisk".
If you want to check a list of words, you need to use the condition builder to add an "OR" for each word separately.

In addition, you're not getting the value of a variable named "goid" in the second branch, but of a variable named " goid"; The syntax for tokens does not allow random whitespace, so everything after the colon and before the closing brace is interpreted as part of a variable name.

lexsan82

  • Newbie
  • *
  • Posts: 2
Re: Waiting for Spoken Response not working?
« Reply #2 on: December 04, 2020, 06:27:39 PM »
THANK YOU!