Author Topic: 3 sound files - play one at random when command initiated  (Read 1944 times)

Tripwire

  • Guest
3 sound files - play one at random when command initiated
« on: May 20, 2019, 05:25:20 PM »
Hi everyone - I just started using VA and am coding it to use with Elite Dangerous. I've got a few things working but I'm not super tech savvy to say the least so I'm looking for some help here.

I have 3 sound files that I would like VA to choose one at random to play when I issue a voice command.

For example.

When I say - "Request Docking" - I want one of the following sound files to play at random before continuing on with the the rest of key press macro.

sound1.wav
sound2.wav
sound3.wav

Hope that all makes sense. Thanks in advance :)

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: 3 sound files - play one at random when command initiated
« Reply #1 on: May 20, 2019, 05:39:38 PM »
Have you tried the "Play a Random Sound" action?

Don't check the "Wait until sound completes before continuing command" option, and the command will proceed while the sound plays.


Press F1 while VoiceAttack has focus to open VoiceAttackHelp.pdf, which lists and has information on all the available actions.

Tripwire

  • Guest
Re: 3 sound files - play one at random when command initiated
« Reply #2 on: May 21, 2019, 09:25:01 PM »
Thanks - I figured out a script using random small integers and condition. This is all new to me. I'm on a steep learning curve but getting there !! Thanks for your help :)