Author Topic: Reset All Boolean Variables with one command?  (Read 2528 times)

bushido

  • Newbie
  • *
  • Posts: 10
Reset All Boolean Variables with one command?
« on: September 06, 2022, 10:58:22 AM »
TLDR
I would like to know if there is a command to reset all Variables passed as True back to false.

I use Boolean variables to limit commands to specific interface menu pages and reset them one by one during voice end-point commands executions or the menu exit command. The issue is that certain in-game commands can be given directly with keyboard inputs and thus not registered by VA and therefore, leaving boolean variables as true.

I would like to assign a "reset all boolean variables command", if there is one, to the open menu command, so all variables are reset from the start.

[Jester] (Open Menu Command) > [Navigation] > [Destination] > [Waypoint 1] (End-point command)

To be precise, I'm making a profile to voice control DCS F-14 Jester interface, which has several pages and end-point commands.

Thanks


Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4759
  • RTFM
Re: Reset All Boolean Variables with one command?
« Reply #1 on: September 06, 2022, 11:07:51 AM »
There is no action to "reset" all regular variables of any type, no.

If there were, that would be very problematic for any third-party profile/plugin, as their variables could also be unexpectedly reset by that.


You'll need to keep a list of the variables you want to reset, and put them all into your "reset" command as "Set a True/False (Boolean) Value" actions, with the "Set True/False (Boolean) Value To:" option set to "False"

bushido

  • Newbie
  • *
  • Posts: 10
Re: Reset All Boolean Variables with one command?
« Reply #2 on: September 07, 2022, 12:38:28 PM »
Thanks for the response.

Is there a way to get a list of all boolean variables of a profile without having to search for them inside each command?

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4759
  • RTFM
Re: Reset All Boolean Variables with one command?
« Reply #3 on: September 07, 2022, 12:54:05 PM »
Variables don't exist until they're assigned a value, and there is no method for showing arbitrary variables that have been assigned a value, so you will need to look at the commands.

You could use the "list filter" field at the bottom of the "Edit a Profile" window to filter on "Boolean", which should show any commands within that profile containing that term.