Jump to content
Sign in to follow this  
scottb613

FSW LEAR 35 - Al's FSUIPC LUA Scripts = More Button Controls

Recommended Posts

Thanks Al- 

 

For the other script - is it downloadable anywhere or would we send you a PM?


Brendan R, KDXR PHNL KJFK

Type rated: SF34 / DH8 (Q400) / DC9 717 MD-88/ B767 (CFI/II/MEI/ATP)

Majestic Software Q400 Beta Team / Pilot Consultant / Twitter @violinvelocity

Share this post


Link to post
Share on other sites

Depends on the script; the Approach Callouts and HUD scripts above are available in the AVSIM library. If you mean the Lear controls script that Scott initially posted part of above, PM me an email address and I send you the latest version with some instructions.

Al

Edited by ark

Share this post


Link to post
Share on other sites
On 8/18/2019 at 2:43 PM, ark said:

Hi Folks,

For those that just want a script to operate the Lear's Landing and Taxi light switches, the small script below should do it. In operation, each key or button push will move the light switches "one place" at a time in a round-robin (3-way toggle) fashion (Off - Taxi - Landing - Off, etc).Type, or copy and paste, the below into a text editor like Notepad or Notepad++ and save it as L35Lndg&TaxiLts.lua to your sims Modules folder. You can then use FSUIPC to assign either a key or button to activate the script. For example, to assign the Shift+L key combination open the FSUIPC Key Presses tab, click the Set button and push the Shift and L keys on your keyboard, then from the dropdown list select Lua L35Lndg&TaxiLts, check the No Repeats! box, click Confirm and then OK. It should look like this:

a206f09b96.JPG

 

You may need to restart the sim for everything to take effect.

There are couple of things to be are careful about:

1. If you want to rename the script, note Lua script names can have a max of 16 characters to the left of the .lua.

2. In the drop down list beside Lua L35Lndg&TaxiLts.lua you will see other options that start with LuaKill, LuaToggle, Lua Set, etc. You want the 'plain' Lua option as shown in the picture above.

Here's the script. Note  --  signifies a comment.

-- L35Lndg&TaxiLts.lua
-- Using FSUIPC, assign key or button to cycle L35A light switch between Off, Taxi Lights and Landing Lights (3-way toggle).

   land_taxi_lts_switch=ipc.readLvar("L:TAXI_LAND")   --get current light switch value:-1=off, 0=taxi lights, 1=landing lights
   if land_taxi_lts_switch==nil or (land_taxi_lts_switch~=-1 and land_taxi_lts_switch ~= 0 and land_taxi_lts_switch~= 1) then   
      ipc.writeLvar("L:TAXI_LAND",-1)                   --lights off                  --
   elseif land_taxi_lts_switch== -1 then             
      ipc.writeLvar("L:TAXI_LAND",0)                    -- turn taxi lights on
      ipc.writeLvar("L:XMLSND70",1)                    --switch sound
   elseif land_taxi_lts_switch==0 then             
      ipc.writeLvar("L:TAXI_LAND",1)                   --turn landing lights on
      ipc.writeLvar("L:XMLSND70",1)                    --switch sound
    elseif land_taxi_lts_switch==1 then             
      ipc.writeLvar("L:TAXI_LAND",-1)                  --all lights off    
      ipc.writeLvar("L:XMLSND70",1)                    --switch sound
   end
  return

If you have any problems let me know.

Al

Hi Al, Thank You very much for this LUA script. Very useful so you don't have to go to the VC to turn on or off landing and taxi lights.

 

Best Regards,

Roberto

Share this post


Link to post
Share on other sites

Hi Al,

I'm not sure but it seems that I cannot send a PM to you. There is a hint  "... cannot receive a message"

Thanks,

Michael


Cheers,
Michael

Aorus Master z390 / i9 9900KS / GTX 1070@2.1 / 32 GB Ram / all watercooled

Share this post


Link to post
Share on other sites
5 hours ago, CFG212 Michael said:

Hi Al,

I'm not sure but it seems that I cannot send a PM to you. There is a hint  "... cannot receive a message"

Thanks,

Michael

Hi Michael,

Well that is very strange.  I have certainly received PMs from others although not in the last few days or so. Don't know what might have changed.

I'll try to send you a PM with my email address.

Al

EDIT: Figured out the PM problem, I think. My message inbox was full. Apparently there is a 100 message limit, which makes sense. Just never thought about it before. 🙁

 

Edited by ark

Share this post


Link to post
Share on other sites

I just found the v2.9 Lua scripts from 2017 on my storage drive- do you think they'd still work?


Brendan R, KDXR PHNL KJFK

Type rated: SF34 / DH8 (Q400) / DC9 717 MD-88/ B767 (CFI/II/MEI/ATP)

Majestic Software Q400 Beta Team / Pilot Consultant / Twitter @violinvelocity

Share this post


Link to post
Share on other sites
35 minutes ago, bjratchf said:

I just found the v2.9 Lua scripts from 2017 on my storage drive- do you think they'd still work?

I'm not sure what version you have. I did not have P3D at that time, and the Lear Controls script has been updated since then with additional functions, but you can certainly give it a try to see if it does what you want. I'll be glad to send you the latest version if you PM me an email address.

Al

Share this post


Link to post
Share on other sites
On 9/11/2019 at 10:18 AM, ark said:

I'm not sure what version you have. I did not have P3D at that time, and the Lear Controls script has been updated since then with additional functions, but you can certainly give it a try to see if it does what you want. I'll be glad to send you the latest version if you PM me an email address.

Al

Hey Al - I just tried to PM you and your box says not receiving pms - can I please get a copy of the Learjet script - I want to use that to create one for the MU-2 (unless you already have that working) - I looked at your LVAR examples for the MU in the other thread - just trying to wrap my head around it (new to LUA script creation, but have been doing a bit in Linda) - thanks again for the help - Julian

 

Edited by julian46

Share this post


Link to post
Share on other sites
1 hour ago, julian46 said:

Hey Al - I just tried to PM you and your box says not receiving pms - can I please get a copy of the Learjet script - I want to use that to create one for the MU-2 (unless you already have that working) - I looked at your LVAR examples for the MU in the other thread - just trying to wrap my head around it (new to LUA script creation, but have been doing a bit in Linda) - thanks again for the help - Julian

 

Hi Julian,

Sorry, didn't realize my PM box was full -- fixed that now. PM me an email address and I'll send you a controls script that I have for the MU2.

Al

  • Like 1

Share this post


Link to post
Share on other sites
20 minutes ago, ark said:

Hi Julian,

Sorry, didn't realize my PM box was full -- fixed that now. PM me an email address and I'll send you a controls script that I have for the MU2.

Al

sent Al - thanks

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...