Author Topic: Would this need a loop and if so how?  (Read 1404 times)

AH_Hollywood

  • Newbie
  • *
  • Posts: 7
Would this need a loop and if so how?
« on: April 03, 2020, 08:19:50 PM »
Hello All,

New to VA and excited to use it.

I have read most of the manual and do not possess the skill set for scripting etc. (or at least not presently)
Not sure if the subject line is correct, but here is what I am trying to achieve...

Flight Sim, IL-2 Battle of Stalingrad.. with a particular key command to toggle through the various "bomb drops" or bomb toggle settings. (ie single drop or both bombs). Both of the these actions are assigned to one key.. lets call it "B"

Present once, single, press again, both....


I am trying to assign a VA command to this with TTS..  where it will state "single selected, or both bombs, etc.. something like this.. I need help on how I would arrange this..  would it be a condition if then or some sort of loop?

Thank you in advance for any guidance.

Hollywood


 

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: Would this need a loop and if so how?
« Reply #1 on: April 03, 2020, 08:49:19 PM »
If I understand correctly, pressing "B" once would have TTS speak "single selected", and pressing it again would speak "both selected", and on the next press it would go back to "single selected"?

That can be done using a variable and a condition:
Code: [Select]
Begin Boolean Compare : [bombSelectorSingle] Does Not Equal True
    Say, 'single selected'
    Set Boolean [bombSelectorSingle] to True
Else
    Say, 'both selected'
    Set Boolean [bombSelectorSingle] to False
End Condition

Make sure to check the "Evaluate 'Not Set' as false" option.

AH_Hollywood

  • Newbie
  • *
  • Posts: 7
Re: Would this need a loop and if so how?
« Reply #2 on: April 03, 2020, 08:59:32 PM »
Quote
If I understand correctly, pressing "B" once would have TTS speak "single selected", and pressing it again would speak "both selected", and on the next press it would go back to "single selected"?

Yes!


Awesome. Thank you for the quick response.

I will need to read up on Boolean.

I’ll give this a try.

Thanks again.

P.S. Been talking about how cool VA is to my group of buddies and at least one purchased it as well.
Hopefully others with buy it soon.