Author Topic: Get audio feedback from keyboard or joystick  (Read 4428 times)

Ndimov

  • Guest
Get audio feedback from keyboard or joystick
« on: August 24, 2016, 04:35:13 PM »
Hi.

I wanted to know if it is possible to have VA give me the audio feedback of a certain command while doing it by pressing a button on my HOTAS without doing the input command itself.

For example I have a VA command to "deploy landing gear'' that deploys the landing gear and has a speech feedback on it (voice telling me "landing gear deployed"). I have a button on my HOTAS to deploy the landing gear also, so I would like to get the voice feedback saying "landing gear deploy" when I press the button.

I found that I can bind or trigger certain commands in VA to a joystick button press, but since the action is already binded to that same button in the game I get the voice feedback but also the action repeated, once by the game and then again by VA.

I know I could repeat all commands only with voice or unbind my joystick from the game and have VA send the input but that seems less than ideal since the joystick would not work without VA so I thought that maybe there is a better way.

Sorry if my post was not very clear, English is not my mother tongue so It's hard to get the point across

Thanks!

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4747
  • RTFM
Re: Get audio feedback from keyboard or joystick
« Reply #1 on: August 24, 2016, 04:48:57 PM »
You can use the "{CMDACTION}" token to check how the command was triggered:

Code: [Select]
Begin Text Compare : [{EXP: '{CMDACTION}' = 'Keyboard' OR '{CMDACTION}' = 'Joystick'}] Equals '1'
    Play sound, 'ding.wav'
Else
    Write '[Blue] Command executes' to log
End Condition

Ndimov

  • Guest
Re: Get audio feedback from keyboard or joystick
« Reply #2 on: August 24, 2016, 06:41:17 PM »
I'm just learning how to use VA so I'm not very familiar with this kind of scripting procedure, I was thinking that there could be a solution using the GUI or an option I might be missing.

Anyway I'll keep reading the documentation and tutorials to implement this solution in case it's the only way to do it.

Thank you very much Pfeil.

Gangrel

  • Caffeine Fulled Mod
  • Global Moderator
  • Full Member
  • *****
  • Posts: 216
  • BORK FNORK BORD
Re: Get audio feedback from keyboard or joystick
« Reply #3 on: August 25, 2016, 07:59:43 AM »
For the keyboard, you can prevent the keypress from being passed through to the game. Unfortunately, this is not possible with the joystick if I remember correctly.

((Side note: This is why the HCS voicepacks have the keybinds set to "not pass through" to prevent the double action)

Nico1854

  • Guest
Re: Get audio feedback from keyboard or joystick
« Reply #4 on: August 29, 2016, 01:47:43 PM »
I simple have 2 commands for This. One That answers to my Voice and deploys gear + plays a Sound. Second command only joystick activated and only plays the Sound.