Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Landing Light toggle (NGX)

Featured Replies

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?

  • 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
•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••

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.

  • Author

Forgot to check for the default shortcut blush.pngAdded 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?

  • 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
•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••

  • Author

Great information. Thanks again.

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 regards

Roland Pohl
Vice chairman FSC e.V.

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
--------------------------------------------------------------------------------------

  • 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
•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••

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 regards

Roland Pohl
Vice chairman FSC e.V.

  • 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
•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••

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 regards

Roland Pohl
Vice chairman FSC e.V.

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 Hypnotized.gif

Guenter Steiner
--------------------------------------------------------------------------------------

Betatester for: A2A, LORBY, FSR-Pillow Tester
--------------------------------------------------------------------------------------

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.