Jump to content

Sign in to follow this  
KL Oo

Assigning multiple events to one button switch

Recommended Posts

Hi guys,

 

I've just purchased a new Warthog HOTAS and am loving it. Over the past 2 days I've downloaded LINDA and learnt a lot about assigning events to button presses and am currently utilising the NGX modules provided. Great stuff.

 

What I'd like to know is if its possible to assign two events to occur consecutively upon a single button press. I.e, I want yo assign one button press to firstly enact NGXCDU GND PWR ON and then NGX GRD PWR ON.

 

I;ve tried creating mouse macros with FSUIPC but thats been problematic and I think part of the issue is FSUIPC not being able to pickup certain PMDG events or something.

 

Anyway, is there a way to do this - run two events for one button press.

 

Cheers,

 


Kael Oswald

i7 8086k @ 5.1 / ASUS ROG Maximus XI / 16GB DDR4 3600 @ 15 / H150i PRO AIO / RTX 2080 TI / 49" SONY 4K LCD TV

Share this post


Link to post
Share on other sites

Here is a good link over at A2A that shows how to do it. http://a2asimulations.com/forum/viewtopic.php?f=55&t=19524

26 minutes ago, KL Oo said:

Anyway, is there a way to do this - run two events for one button press.

 


Sam

Prepar3D V4.4/8086K@5.0/EVGA 1080TI SC Black/850W PSU/Windows 10/40" 4K Samsung Monitor@3840x2160/ASP4/ASCA/ORBX/ChasePlane/General Aviation/A2A/Vertx/

Share this post


Link to post
Share on other sites

Welcome to the LINDA community.

You can you the OnPress and OnRelease to assign the 2 sequential functions you wish to call. This is the quickest and easiest method.

Alternatively, you can write you own function containing those functions you wish to call. If you have an aircraft other than FSX Default click on Edit and then Edit User. This opens the user.lua module into the LINDA Editor. Then enter the following code, for example:

  • function myFunction()
  • function1()
  • sleep(50)
  • function2()
  • end

When done click on Save and Reload LUA Engine. 

Assign your new myFunction from the aircraft user mode to your joystick button.

Edited by ScotFlieger
  • Upvote 1

Andrew Gransden

Scotland, UK

LINDA Support/Developer - VATSIM and BAVirtual - Airbus Flyer

i7 1TB SSD GTX980 - FSX/P3D - Aerosoft Airbus A318/A319/A320/A321 - FS2Crew

Share this post


Link to post
Share on other sites

Sorry where do we find the built in function() list ?

SOLN:

If you click on "Edit Actions" on the bottom right - it will show a list of all the functions.

The names are the same ones we see in the drop down list when assigning to buttons (with underscore to represent spaces)

eg:

function AB_ALT_plus ()   for "AB ALT plus"

 

Edited by julian46
more information

Share this post


Link to post
Share on other sites

Writing LINDA code requires a little knowledge of programming for you to use the LUA interpreted language. I used function1() and function2() as example function names. You will need to replace these with the names of your desired functions.

To answer your other question. LUA function names can not use spaces so underscores are normally used by us programmers. For readability these are removed when listed.

Edited by ScotFlieger
  • Like 1

Andrew Gransden

Scotland, UK

LINDA Support/Developer - VATSIM and BAVirtual - Airbus Flyer

i7 1TB SSD GTX980 - FSX/P3D - Aerosoft Airbus A318/A319/A320/A321 - FS2Crew

Share this post


Link to post
Share on other sites

Thanks so much for your help Scott - Worked a treat. A world of options has opened up!!! I can pre setup my entire aircraft with one button press!

 

Edited by KL Oo

Kael Oswald

i7 8086k @ 5.1 / ASUS ROG Maximus XI / 16GB DDR4 3600 @ 15 / H150i PRO AIO / RTX 2080 TI / 49" SONY 4K LCD TV

Share this post


Link to post
Share on other sites

You are very welcome. Enjoy!!


Andrew Gransden

Scotland, UK

LINDA Support/Developer - VATSIM and BAVirtual - Airbus Flyer

i7 1TB SSD GTX980 - FSX/P3D - Aerosoft Airbus A318/A319/A320/A321 - FS2Crew

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...