Axis and Ohs: Help and questions

well that looks familiar :slight_smile:
There are a couple of ways to find out what variables you need:

  1. In MSFS Dev-Mode look for the Tab “Windows” → “Model-Behavior” → “Variables” and search
  2. Look at the code (for example: “A320_NEO_INTERIOR.xml”) from the game-folders
  3. Trying for good luck

Addition to 2.:
If you see something like this in the xml:

<LEFT_SINGLE_CODE>(& g t ;H:A320_Neo_FCU_EXPED_PUSH)</LEFT_SINGLE_CODE>

The “<LEFT_SINGLE_CODE>” means that it is an interaction of your left Mouse-Button.
The “( & g t ; H:A320_Neo_FCU_EXPED_PUSH)”

you can address in AAO via (>H:A320_Neo_FCU_EXPED_PUSH) so the “& g t ;” means “and greater than” witch is the same as “>”

where you can take a look at:
http://www.prepar3d.com/SDKv3/LearningCenter/utilities/scripting/rpn_scripting.html

Lets take a look at an example Script:

(L:A32NX_BRAKE_FAN, Number) 10 * (L:A32NX_BRAKES_HOT, Number) + s1 l1 10 >= if{ 1 (>MIDI:3:NoteOn:1:1) } l1 1 == if{ 2 (>MIDI:3:NoteOn:1:1) } l1 0 == if{ 0 (>MIDI:3:NoteOn:1:1) }

the first variable (0/1) is multiplied by 10:

(L:A32NX_BRAKE_FAN, Number) 10 *

a second variable (0/1) is then added to the sum via the “+”:

(L:A32NX_BRAKES_HOT, Number) +

then the sum of that gets saved for later use via:

s1

until now we have only read stuff, now lets do something with that:
first we recall our saved value (s1) with:

l1

next, if the value of l1 is larger or equal to 10 we want to get a led on our x-touch to light up:

10 >= if{ 1 (>MIDI:3:NoteOn:1:1) }

and we repeat that process for all the different behaviors we want:

l1 1 == if{ 2 (>MIDI:3:NoteOn:1:1) }
l1 0 == if{ 0 (>MIDI:3:NoteOn:1:1) }

so with this script we can trigger leds with a value of s1/l1 if that value is 0, 1, >= 10

You can view the script logic like this:

(L:A32NX_BRAKE_FAN, Number) 10 *
(L:A32NX_BRAKES_HOT, Number) +
s1
l1 10 >= if{ 1 (>MIDI:3:NoteOn:1:1) }
l1 1 == if{ 2 (>MIDI:3:NoteOn:1:1) }
l1 0 == if{ 0 (>MIDI:3:NoteOn:1:1) }

3 Likes