Hello fellow Voiceattackers,
I have a question regarding a certain aspect of VA programming: I use VA to keep track of some states in variables (values). I have several ways of toggling these: Joystick inputs, certain keys, voice commands.
For example in my setup for Elite: Dangerous the button 'L' is toggling lights, as well as a certain button on my joystick. I don't just want a command 'Toggle lights' in VA, but 'Lights off' and 'Lights on', that should not do anything if the lights are already in the correct state. I also have more complex commands like 'Landing mode' which turns on the lights as well as extend the landing gear and 'Flight mode' which retracts the cargo bay, retracts the gear and turns off the lights, when any of these are necessary. My approach would be to track the individual device states in a value in VA.
Now I would have a boolean value in VA for the lights state, and toggle that on the press of 'L', the joystick button and on the corresponding voice commands when they actually toggle the state.
The problem:
There are certain areas in the game like a map search input and in-game-chat where I want to be able to press 'L' in the input fields without having VA toggle the variable state, as pressing the key there does not toggle the lights in-game.
Now I could, theoretically, try to track all actions leading to such inputs and hopefully all actions that lead to leave these areas to disable and enable keyboard tracking of these states.
However, I usually open the Map by voice or key command, but there are other ways to open the map (i.e. from a sub-menu of the current active missions) where I select the map with the joystick. I cannot think of means to reliably track these.
I also don't want to manually disable key recognition, because I think I would in most cases simply forget to do that, screwing the states of all my values.
So, do you have any ideas on how to solve this with VA?
Also if there is a better way in general, please point me to that ;-)