Author Topic: Simple game checklist help  (Read 969 times)

johncook19@hotmail.com

  • Newbie
  • *
  • Posts: 4
Simple game checklist help
« on: June 24, 2022, 04:03:46 PM »
I am very new to this software and need some advice. I want to create a simple aircraft checklist for a voice command which requires a key press to allow the next voice command to activate eg

voice says “ turn on battery”
I then press a key to confirm this has been done, allowing the next voice command,
‘Turn on the lights”  and so on …..

I can do the text to speak line but can’t work out how to create the “get a key stroke to continue” bit?

Any help would be most appreciated! thanks.

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: Simple game checklist help
« Reply #1 on: June 24, 2022, 04:10:54 PM »
You can use a the "Device State" tab of a loop action, to wait for a key to be pressed. I.E. an empty loop (no actions between the "Loop Start" and "Loop End" actions) that checks whether a given key is not pressed.

Especially if you specifically don't want the "Wait until speech completes before continuing command" option of the "Say Something with Text-To-Speech" to be checked (so you don't have to wait for the TTS playback to finish before pressing the key for the next instruction), you'll want to add a loop after that action that waits for the key to be released as well, as otherwise multiple items would get triggered with one keypress.


Press F1 while VoiceAttack has focus to open VoiceAttackHelp.pdf in your default PDF viewer, which contains information on VoiceAttack's features.

This topic may also be of use, in addition to the official documentation:
Control flow (If, Else, ElseIf, Loop, Jump) basics

johncook19@hotmail.com

  • Newbie
  • *
  • Posts: 4
Re: Simple game checklist help
« Reply #2 on: June 26, 2022, 02:29:26 PM »
Great advice, thank you, that works a dream! 👍

SemlerPDX

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 291
  • Upstanding Lunatic
    • My AVCS Homepage
Re: Simple game checklist help
« Reply #3 on: June 28, 2022, 09:24:31 PM »
A little more inline with the concept, you could create another voice command with the 'When I say' phrase of "CHECK" ... and this could set some variable to allow your checklist to proceed on a verbal command rather than key/button input.

Just some food for thought.  Best wishes and good luck!

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: Simple game checklist help
« Reply #4 on: June 28, 2022, 09:34:40 PM »
A separate command is one option, however you could instead replace the loop actions with a "Wait For Spoken Response" action, to achieve the same result within a single command.

With the "Text Variable" field set to "~" (this does not affect the behavior, but the field cannot be empty), the "Timeout" value set to 0, and the "Continue on any Speech" option unchecked, that action will wait indefinitely (as long as the command isn't stopped externally, at least) for a response.