#Generate Lvars
1 messages · Page 1 of 1 (latest)
If you write something to an unused lvar another event can read that. That is more of an MSFS feature than an MF one though
OK, thank you I will try that. What I need to do is this: I am using Airmanager for my cockpit. Unfortunately Airmanager is unable to initiate some aircrafts internal events. So I want to generate two Lvars, named e.g. LVAR_INTERNAL_EVENT_SET_1 and LVAR_INTERNAL_EVENT_SET_0, that I can write to from an Airmanager instrument. The contents is an integer index. I need an MF function that reads the LVAR, gets the internal event name from a list according to the index provided in the LVAR, and then sends 0 or 1 to the internal event, respectivley. - The aircraft is the Salty 747, and I want to write 1 to this event: COMMON_push_ovhd_electrics_battery_Cover to open the Battery Switch Flap. I want to define the indexed list of event myself in an array or so. - Somewhat complex I know ...
i don't think that mobiflight will be able to do what you need it to do. looking at the airmanager docs you should be able to call that event directly from your instrument using msfs_event("B:Common_push_ovhd_electrics_battery_Cover", 1)
I tried. No, this event does not work. I tried with and without a trailing _Set. Oh wait, I think I tried fs_2020_write(). I'll check
@elder lodge, thank you very much for looking at my problem and your suggestion. I cannot believe I did not think of the Airmanager fs2020_event() rather than fs2020_write() function . fs2020_event("B:COMMON_push_ovhd_electrics_battery_Cover", 1) does work just fine!
no worries. happy to help
MF can read a l-var from the sim of course,
and you can use the Display > Input event feature
to loop it in as an input
whenever the lvar changes
but yeah, glad that it worked dorectly too.
Am I understanding correctly that air Manager can use B: events with msfs2020?
according to their documenation yes
The only way I know of doing that is via the xml file hack, where an Lvar is used to trigger a call to the B: event.
im guessing the are using the limited inputevent support which was introduced in su14 i think
Neil did a proof of concept app for that and it seemed very awkward and limited. It didn't seem worthwhile to continue exploring it.