EDIT: Since this got flagged and reported by the Shorts Dev as off-topic to his thread, mods moved this into this new thread. Out of context, this info makes no sense but it’s for the Shorts SD3 plane.
Here is the code for the LVAR to BVAR hooks. Obv, you can change the HOBAN part to whatever you want lol, but I like to make it unique so I can see more easily which LVARS I created with this hook. You mentioned not knowing if the LVAR exists you were setting, it shouldn’t exist before you set it here. You are making your own LVAR to use. Call it whatever you want.
(L:HOBAN_ENGINE_Ignition_1_Set, Number) s0 0 > if{ l0 1 - (>B:ENGINE_Ignition_1_Set) 0 (>L:HOBAN_ENGINE_Ignition_1_Set) }
(L:HOBAN_ENGINE_Ignition_2_Set, Number) s0 0 > if{ l0 1 - (>B:ENGINE_Ignition_2_Set) 0 (>L:HOBAN_ENGINE_Ignition_2_Set) }
This code subtracts 1 from what you set the LVAR per the TBM BVAR example link I posted earlier.
“When creating your custom event it’s important to offset the value by one from 0. This ensures the event only takes effect if the value is explicitly set by (whatever app). For example if the sim expects a value of 0 to turn something off and 1 to turn something on the custom event should instead take a value of 1 for off, 2 for on, and then subtract 1 from the provided value before passing it to the sim.”
In this case, you’d feed the custom LVAR 3,2,1 and it will pass 2,1,0 to the BVAR. Once it passes it on, the last step in that code is to reset the LVAR back to 0.
3·(>L:HOBAN_ENGINE_Ignition_1_Set,·Number)
2·(>L:HOBAN_ENGINE_Ignition_1_Set,·Number)
1·(>L:HOBAN_ENGINE_Ignition_1_Set,·Number)
3·(>L:HOBAN_ENGINE_Ignition_2_Set,·Number)
2·(>L:HOBAN_ENGINE_Ignition_2_Set,·Number)
1·(>L:HOBAN_ENGINE_Ignition_2_Set,·Number)
EDIT:
In case this is helps you ot maybe others searching, I wanted to be complete. The final step is to paste this in whatever interior.XML file is appropriate for the plane you are configuring. In my case, I tested on the 330 cargo.
Edit the BBS-Shorts-330-interior.xml file located in \blackbox-aircraft-shorts-regional\SimObjects\Airplanes\BlackBox-Shorts-Regional-330-Cargo\model
Paste this after line 42 which should be </Component>
<!-- BVar link ################################# -->
<Component ID="LVAR_TO_BVAR">
<UseTemplate Name="ASOBO_GT_Update">
<UPDATE_CODE>
(L:HOBAN_ENGINE_Ignition_1_Set, Number) s0 0 > if{ l0 1 - (>B:ENGINE_Ignition_1_Set) 0 (>L:HOBAN_ENGINE_Ignition_1_Set) }
(L:HOBAN_ENGINE_Ignition_2_Set, Number) s0 0 > if{ l0 1 - (>B:ENGINE_Ignition_2_Set) 0 (>L:HOBAN_ENGINE_Ignition_2_Set) }
</UPDATE_CODE>
<FREQUENCY>1</FREQUENCY>
</UseTemplate>
</Component>
The line after this block you pasted should be from the original file and read </Behaviors>.