August 14, 201114 yr PMDG 737 NGXHaving some trouble editing the lua file to make the landing lights toggle with one button.Tried a few things but I cant seem to get it.It works great if I assign two buttons, one for on and one for off, but I would like to only use one button. Can anyone nudge me in the right direction?
August 14, 201114 yr Commercial Member Add this function somewhere inside "Lights, external" section: function NGX_LAND_ALL_toggle () if _t('LAND_ALL') then NGX_LAND_ALL_on () else NGX_LAND_ALL_off () endend ...and assign it. Artem Crum, EASA PPL•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••LINDA → Lua Integrated Non-complex Device Assigning•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
August 14, 201114 yr Send the CTRL + L key presses via LINDA, this is the default key shortcut which toggles the landing lights on and off for the NGX. EDIT: you beat me to it Artem with a more elegant method. Cheers, Andy.
August 14, 201114 yr Author Forgot to check for the default shortcut Added Artem's code and it works great. Thanks Artem and Andy, much appreciated. Looking at Artem's code brings up another question though, what is the _t in the code signify?
August 14, 201114 yr Commercial Member Looking at Artem's code brings up another question though, what is the _t in the code signify?This is a part of LINDA framework. We call it "universal toggler". This is just an easy way to toggle two parts of code on each call. String in parentheses is a unique identifier for this particular toggling case. Artem Crum, EASA PPL•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••LINDA → Lua Integrated Non-complex Device Assigning•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
August 15, 201114 yr Hi Artem,this sounds interesting, is it also possible to make a toggle with FSX_Control View_Camera_Panel_# (which is 66850 to 66859)so I could toggle between 2 VC-CamerasWould this funktion work? function VC_Pedestal_toggle ()if _t("Pedestal") then ipc.control(66853)else ipc.control(66851)endend With kind regardsRoland PohlVice chairman FSC e.V.
August 15, 201114 yr try it ;) use the LINDA LUA editor:left clicking on the first line of the function executes it immediatelly for testing (if FSX running of course and script saved) Guenter Steiner -------------------------------------------------------------------------------------- Betatester for: A2A, LORBY, FSR-Pillow Tester --------------------------------------------------------------------------------------
August 15, 201114 yr Commercial Member Little corection: Right-click the function name in editor to get it instantly executed inside FSX. Artem Crum, EASA PPL•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••LINDA → Lua Integrated Non-complex Device Assigning•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
August 15, 201114 yr Hallo Günter,one question about LUA Editor.I enabled developer-mode, and every time I click on Open, I receive an error And I don't believe it, that it could be so easy, my first function works :-))) With kind regardsRoland PohlVice chairman FSC e.V.
August 15, 201114 yr Commercial Member 1. You don't have to use 'Open' inside the editor. Choose module in LINDA as always, popup the menu and inside each library and module sub menu you will see the "Edit module" item. It will open corresponding Lua file for editing.2. The error you got tell's you, that you have to use Vista or Win7 to be able to open files from inside the editor. Artem Crum, EASA PPL•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••LINDA → Lua Integrated Non-complex Device Assigning•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
August 15, 201114 yr Hi Artem, that is copied. And I have to click the right mouse button, to activate funktions in the LINDA-Editor, not the left Button. With kind regardsRoland PohlVice chairman FSC e.V.
August 15, 201114 yr And I have to click the right mouse button, to activate funktions in the LINDA-Editor, not the left Button. yes, I'm left hand, sorry Guenter Steiner -------------------------------------------------------------------------------------- Betatester for: A2A, LORBY, FSR-Pillow Tester --------------------------------------------------------------------------------------
Create an account or sign in to comment