#Custom variables in mobiflight version 9.7

1 messages · Page 1 of 1 (latest)

pseudo notch
#

Hello everyone, I have just started using mobiflight and I love it! But, I have found my custom variable but how do I import it in 9.7?

night briar
# pseudo notch Hello everyone, I have just started using mobiflight and I love it! But, I have ...

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?

pseudo notch
#

The airplane is the bredok3d f22 raptor. I am playing msfs20202 and the variables are AUTOPILOT_Altitude_Inc and AUTOPILOT_Altitude_Dec

night briar
#

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.

pseudo notch
#

Yup, already had that on. The hole variable is (>B:AUTOPILOT_Altitude_Inc) and (>B:AUTOPILOT_Altitude_Dec)

night briar
#

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 [...]

night briar
#

you still have to dig beyond the B: event to see what is the underlying code used.

pseudo notch
night briar
#

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

pseudo notch
#

ok, thank you

#

Found it thank you!

night briar
#

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

pseudo notch
#

so just the h variable

night briar
#

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

pseudo notch
#

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

night briar
#

yeah

pseudo notch
#

Thank you so much!

night briar
#

did it work ok?

pseudo notch
#

Yes it did. I would have never figured that out by myself. Thank you