#Custom variables in mobiflight version 9.7
1 messages · Page 1 of 1 (latest)
Hello and welcome.
When you say you found your custom variable, what are you referring to? Normally, new users will use the Mobiflight event presets available in the dropdown menus for both inputs and outputs.
You can enter custom code into the preset code box that opens when you check the Show preset code option.
Which airplane is this for? Which simulator? What is this custom variable for?
The airplane is the bredok3d f22 raptor. I am playing msfs20202 and the variables are AUTOPILOT_Altitude_Inc and AUTOPILOT_Altitude_Dec
OK, no presets for that one yet
You need to know what the code does with that variable, not simply the name
If you don't know the code, then you may have to learn to use Developer Mode, Behaviors to dig for it.
Yup, already had that on. The hole variable is (>B:AUTOPILOT_Altitude_Inc) and (>B:AUTOPILOT_Altitude_Dec)
here is a guide to get you started
https://www.badcasserole.com/uncovering-input-events-using-the-msfs2020-model-behavior-dialog/
One of the most common questions asked in the MobiFlight Discord is how to control something in a plane. With the incredible MSFS2020 SimConnect event support in MobiFlight pretty much anything is possible... if you can figure out what event to use. HubHop is a great resource and should be everyone's first stop when researching [...]
Unfortunately, still not enough. No one has access to B: events outside of the sim.
you still have to dig beyond the B: event to see what is the underlying code used.
Nope, Mouserect will only show you the B: event
you have to go to the Input Events tab to look for that event
make sure to uncheck the Minimize box and press the Reload User Container button. Otherwise the code is not shown.
Read the guide I showed
good.... so
the first line marked red is the INC event
the second red arrow is the DEC event..
you can pretty much ignore the rest of that code
so just the h variable
No, the whole line
the K: evet is what triggers action by the sim
the H: event is most probably what controls the animation of the knob
that last statement might not be completely true
so, 3 0 (>K:2:AP_ALT_VAR_DEC) (>H:AP_KNOB_Down) and 3 0 (>K:2:AP_ALT_VAR_Inc) (>H:AP_KNOB_Up
yeah
Thank you so much!
did it work ok?
Yes it did. I would have never figured that out by myself. Thank you