Jump to content
The simFlight Network Forums

TheAviationFox

Members
  • Posts

    5
  • Joined

  • Last visited

Everything posted by TheAviationFox

  1. I can report success! It took me a while to understand what this was all about - I am not a developer/coder 🙈 - but with your step by step instructions and reading the relevant pages in the manual did it. In the end my FSUIPC entries were [Buttons.iFly B737 MAX8] 0=PM,25,CL8:R,0 -{Lua iFlyTaxiRwyON}- 1=PM,24,CL7:R,0 -{Lua iFlyTaxiRwyOFF}- 2=BA000=0 PH,5,CPDome_Light_Up,0 -{Preset Control}- 3=BA000=1 PH,5,CPDome_Light_Up,0 -{Preset Control}- 4=BA000=2 PH,5,CPDome_Light_Down,0 -{Preset Control}- 5=BA000=2 PH,5,C1152,50 -{pause (ms)}- 6=BA000=2 PH,5,CPDome_Light_Down,0 -{Preset Control}- [LvarOffsets.iFly B737 MAX8] 1=L:VC_Dome_Light_Display_VAL=UB0xA000 The minimum delay that made it work was 50ms, anything shorter was not successful, Maybe some useful information for other iFly customers. I have to say that without your help there would have be no way for me figuring this out through offsets. The LUA scripts were already a challenge and I needed you correcting my code on how a LUA script reads information from the SIM! After learning these things now I am a few steps ahead and I can use the knowledge for future programming. Thanks!!
  2. Wow, thanks for taking your time to explain this to me, it all makes more sense now! I will have a close look at it as soon as possible. Your help is highly appreciated.
  3. Alright, I got it to work! The code I used is: if ipc.readLvar("L:VC_Dome_Light_Display_VAL") == 0 then ipc.execCalcCode("39 (>L:VC_Miscellaneous_trigger_VAL,number)") elseif ipc.readLvar("L:VC_Dome_Light_Display_VAL") == 1 then ipc.execCalcCode("39 (>L:VC_Miscellaneous_trigger_VAL,number)") elseif ipc.readLvar("L:VC_Dome_Light_Display_VAL") == 2 then ipc.execCalcCode("38 (>L:VC_Miscellaneous_trigger_VAL,number)") ipc.sleep(100) ipc.execCalcCode("38 (>L:VC_Miscellaneous_trigger_VAL,number)") end You will probably will see it as less efficient. When you wrote I'm trying to figure out how this would work. So, if I define a preset as suggested by you, how do I then proceed? Where do I define such a preset? Can you point me to the right support document or some kind of tutorial? Sorry, I'm pretty new to this part of coding and appreciate some hints.
  4. Thanks John for taking your time to reply. I will test it later tonight and will report back 🙂
  5. Hi all, veteran user of FSUIPC, but new in this forum. Thanks for BAW242 for already supporting me on the scripts for the iFly's RWY turnoff lights, I thought it must be easy to create more LUA scripts for other buttons. Here's me task: MSFS2020 iFly 737MAX 3-way dome light switch single push button (Logitech Wingman Extreme 3D) to toggle through the 3 dome light positions OFF-BRIGHT-DIM I have tried through MobiFlight and I could only get dome light switch button to move down 39 (>L:VC_Miscellaneous_trigger_VAL,number) or up 38 (>L:VC_Miscellaneous_trigger_VAL,number) Further variables are: VC_Dome_Light_Display_VAL This can be 0 (OFF), 1 (DIM) or 2 (BRIGHT). I cannot seem to set this value directly, but I can read it in Developer Mode under Behaviors => LocalVariables Whenever I tried to create a logic with "IF", it would not recognize it. Therefore I am now trying to create an "if" and "elseif" logic to toggle through those positions in the order OFF-BRIGHT-DIM (and then OFF again). So far, nothing is happening in the SIM and that's why I am here. Forgive me my novice errors in coding, I am sure I am making really basic mistakes. When my LUA script says ipc.execCalcCode("39 (>L:VC_Miscellaneous_trigger_VAL,number)") it is all fine: when I push the assigned joystick-button, then the dome light switch gets moved one position down. But when I try to implement a logic, nothing happens: if (L:VC_Dome_Light_Display_VAL, number) == 0 then ipc.execCalcCode("39 (>L:VC_Miscellaneous_trigger_VAL,number)") end Can you spot my mistake? Or is it an issue of the iFly 737MAX?
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.