Author Topic: Squad profile (use one command to cancel multiple button presses)  (Read 2344 times)

HopliteGFX

  • Newbie
  • *
  • Posts: 3
Hi all,

Looked through the forum for a bit and couldn't find anything like this.

In the game "Squad" you can talk to individual squad leaders directly by pressing Num 1-9. It is press and hold to talk. I fly helos a lot and it is quite the chore to talk to each individual squad. I would like to develop a command that goes something like this:

"Squad one" (opens channel- press and hold "Num1")
"blah blah blah"
"Over" (closes channel - stops pressing "Num1")

"Squad two" (opens channel - press and hold "Num2")
"blah blah blah"
"Over" (closes channel - stops pressing "Num2")


Is something like this possible?

Thanks!

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: Squad profile (use one command to cancel multiple button presses)
« Reply #1 on: November 30, 2020, 08:56:30 PM »
A command can be set up to do that, however you may find a short word like "over" is not recognized quite reliably. Either way you'll need to pause between whatever you're saying, and "over", long enough for recognition to stop trying to process what you've just said.

Something like
squad one
Code: [Select]
Press down NumPad 1 key
Wait for spoken response: 'over'
Release NumPad 1 key
would set up a command to do what you're describing.


Provided you don't have background noise that's picked up by your microphone, you could also consider adapting this example, to have the key pressed until you stop speaking (regardless of which word you speak at the end).

HopliteGFX

  • Newbie
  • *
  • Posts: 3
Re: Squad profile (use one command to cancel multiple button presses)
« Reply #2 on: December 01, 2020, 12:51:46 AM »
Awesome! Thanks for the reply! I'll be setting this up tonight.

HopliteGFX

  • Newbie
  • *
  • Posts: 3
Re: Squad profile (use one command to cancel multiple button presses)
« Reply #3 on: December 01, 2020, 01:01:40 AM »
A command can be set up to do that, however you may find a short word like "over" is not recognized quite reliably. Either way you'll need to pause between whatever you're saying, and "over", long enough for recognition to stop trying to process what you've just said.

Something like
squad one
Code: [Select]
Press down NumPad 1 key
Wait for spoken response: 'over'
Release NumPad 1 key
would set up a command to do what you're describing.


Provided you don't have background noise that's picked up by your microphone, you could also consider adapting this example, to have the key pressed until you stop speaking (regardless of which word you speak at the end).


EDIT: The key is not continuously being pressed with this code.

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: Squad profile (use one command to cancel multiple button presses)
« Reply #4 on: December 01, 2020, 05:40:46 AM »
If set up identically to that example, the key will be held down until the speech recognition engine recognizes "over" (note that this may not necessarily be when you say "over").

You can add a "Write a Value to the Event Log" action before the release action to check when the "Wait For Spoken Response" is allowing the command to continue.

Also note that, logically, if you have the "Timeout" value other than 0 set, the action will allow the command to continue after that time (as mentioned in the documentation; Press F1 while VoiceAttack has focus to open VoiceAttackHelp.pdf in your default PDF viewer).


Have you tested this command in-game, or have you opened notepad, executed it, and concluded that it is not working?