That worked, however I still don't fully understand what does what in that line of code, but thank you nonetheless.
As for cowl flaps, "The preset calculator code to set an lvar value (without any calibration) is just "$Param (>L:lvarname)", and you give the parameter value in the assignment. Alternatively, you can hard-code the value into the preset and just use that."
That is alien language to me, which I would like to learn 🙂
What I am trying to achieve: I have 3-way switch on my HOTAS, up and down positions has separate input, while middle is just off, so up should be Cowl flaps L:var_cowlFlapSwitch_L with value 1, down is value 2 and when I release the switch, value is 0. What do I write in the file for event to appear in IU to bind the switch?
I checked existing presets, Duke has lots of them, but almost all are tertiary system controls not used often and many variables listed in the manual are missing.