MobiFlight Community Support

Welcome to the forum for MobiFlight! Feel free to reach out to the community in case you have questions, issues or just want to share great ideas or details about your latest home cockpit project.

You like MobiFlight? Donate via PayPal and support the MobiFlight development. Thanks! 

icon
Avatar
pascalan
Posts: 2
Hello
Can someone tell me how to use mobiflight variable .
What to write after "NAME " ( screenshot in url )
I use p3d
Thanx
P
https://drive.google.com/file/d/1aPuV7eeuEyaeYCHBvh5fhdLiunkmrYd7/view?usp=sharing
2022-01-08 19:56
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 5474
Supporter
Hi

Seb is still providing a new Video on the "Mobiflight Youtube Channel"
I not see it myself to the end.... But i think it include it ! Please check out!

About basic idea....

If you still understand the "old" logic to work with "FSUIPC Custom Offsets" ...... the MF Variable is the Same..... Just external to FSUIPC !

The First Setting "Type" define if the Variable is a INTEGER ( A Full Number like 12345 ) or a STRING ( A couple of Character like "HELLO" )
The second Setting is the "name" of the Variable.... You can define youreself! ( Like in the past the FSUIPC Offset where you store your Custom Offset ).

Simpel exmaple......

You Build a Input for a Button.....
You say you like to write the "MF Variable" called " TEST" ..... Typ is "Number" ( Cause we want tho show a Integer Number)
In the ON Press Value Field you say " $+1"

Means every time you press this button you will change the MF Variable called "TEST" .... And you say " Get the current Value ($) and ADD 1 (+1) to it and write the Result back to this Variable !

If you now read this Variable in a Output Config ( Use the correct Typ (Number) and the correct Name (TEST) to handle the same Variable, you writ ewith the Input)

Then this Output at systemstart will show "0" ...... If you press the Button then thsi output will show "1".....: Cause your INPUT Config for that Button say :
"Get the value of tha Variable (0) .... ADD 1 ( 0+1=1) and write the Result (1) to the Variable Again!
So it Read 1 now...... If you press the Button Again.... ( 1+1+=2) it will now show "2"!

*****************
in easy words....
A OUTPUT Config will READ the Variable you define within the settings....... the Value is "0" at Systemstart !
A INPUT Config can chage a Variable when you define it as "Typ of Input" ..... e.g. write it to 1/0 by botton press.
Anf for sure with more complex code and e.g. Placeholders you can say something like "Write the current Altitude when i press a Button to Variable "X".
Good Luck !
2022-01-09 01:53
Avatar
pascalan
Posts: 2
Hello

Thank you for explaining it , i saw the youtube video .
I can now use it .
Thanks
Pascal
2022-01-09 12:03
icon