Jump to content
The simFlight Network Forums

stevem737

Members
  • Posts

    8
  • Joined

  • Last visited

Profile Information

  • Gender
    Male
  • Location
    Milwaukee, WI

stevem737's Achievements

Newbie

Newbie (1/14)

1

Reputation

  1. Spokes, I love the "floor 2, room 11, bed 2" thing! And, John, yes, classic Rush. I was inspired to put the 2112 CD into my car this morning. Still sounds awesome. Remember: "Our great computers fill the hallowed halls." Back to sim-building... John, you're making the argument for auto-ran scripts. I can understand that, but I'm still trying to figure out how to recognize a joystick/button combo in the Lua code. I just stumbled upon this: if ipc.testbutton(3,7) == true then ipc.writeLvar("FUEL_PUMP_sw7",1) else if ipc.testbutton(3,8) == true then ipc.writeLvar("FUEL_PUMP_sw7",0) end I'm going to go run some tests, to see if ipc.testbutton(joystick,button) is the Lua function I need to simply recognize a joystick/button combo in the code. I cannot currently find documentation on ipc.testbutton, but I'll keep looking.
  2. Thanks, Spokes. That does help a little -- I'll certainly keep that in mind. I'm still searching for a code solution like I mentioned, however. BTW, regarding 2112... are you a Priest of the Temple of Syrinx? 😂
  3. Hi Reinhard, Thanks very much for your reply. I guess you're saying that, performance-wise, many smaller scripts are better than one big one. It's not just the 50+ scripts I'll have to write, though... it's the 6 additional entries that FSUIPC creates in the pull-down menu when one, single Lua script is put in the Modules folder (i.e., FSUIPC creates the additional LuaDebug___, LuaKill___, LuaSet___, Lua Clear___, LuaToggle___, and LuaValue___ for every Lua script). So, there'd be 300 (50 x 6) additional entries in the FSUIPC pull-down menu. It's not easy to scroll that massive pull-down menu, if one needs to make a change. Here is a follow-up question: For a double-pole, single-throw physical switch, I cannot use this "toggle" code, because the code can get out of sync with the switch position, depending on where the switch is when you start the software: -- I cannot use this "toggle" code function switch_On () ipc.writeLvar("FUEL_PUMP_sw7", 1) end function switch_Off () ipc.writeLvar("FUEL_PUMP_sw7", 0) end function switch_Toggle () if ipc.readLvar("FUEL_PUMP_sw7") == 0 then switch_On () else switch_Off () end end switch_Toggle () Instead, is there a way to write a single Lua script like this, where it references the joystick controller and the button: -- Hard-code the switch position, instead of a toggle function -- I realize I could have two separate Lua scripts, one for each -- switch position, but combining them would make for fewer scripts if [JOYSTICK1_BUTTON7] == 1 then ipc.writeLvar("FUEL_PUMP_sw7", 1) end if [JOYSTICK1_BUTTON7] == 0 then ipc.writeLvar("FUEL_PUMP_sw7", 0) end 2)
  4. Hello, I've searched the documentation, forum, and web and I'm totally lost... I'm writing Lua scripts to control the JustFlight Vulcan add-on. If I've got a joystick or button box with, say 50 buttons, it seems I need to do one of the following: Write 50 different Lua scripts in the Modules folder, each assigned manually from the Buttons & Switches tab to each button (which makes for a ton of files to manage); or I've read about putting a single Lua script containing all the button code into the Modules folder and configuring the FSUIPC.INI file to automatically launch it. It seems like (2), above, is the way to go. But, my question is how to write that Lua script to assign a joystick/button combo to a given chunk of code. Is there an example/guidance on writing Lua code to recognize the joystick/button combo, to assign the Lua code to? Logically, something like "For Joystick 1, Button 12 pressed, FUEL_PUMP_7=1", "For Joystick 1, Button 13 pressed, FUEL_PUMP_8=1", and so on. Overall, I'm trying to prevent having 50+ Lua scripts, and instead, have everything in one script for easier management. Thank you for any help.
  5. Hello, I've searched the documentation, forum, and web and I'm totally lost... I'm writing Lua scripts to control the JustFlight Vulcan add-on. If I've got a joystick or button box with, say 50 buttons, it seems I need to do one of the following: Write 50 different Lua scripts in the Modules folder, each assigned manually from the Buttons & Switches tab to each button (which makes for a ton of files to manage); or I've read about putting a single Lua script containing all the button code into the Modules folder and configuring the FSUIPC.INI file to automatically launch it. It seems like (2), above, is the way to go. But, my question is how to write that Lua script to assign a joystick/button combo to a given chunk of code. Is there an example/guidance on writing Lua code to recognize the joystick/button combo, to assign the Lua code to? Logically, something like "For Joystick 1, Button 12 pressed, FUEL_PUMP_7=1", "For Joystick 1, Button 13 pressed, FUEL_PUMP_8=1", and so on. Overall, I'm trying to prevent having 50+ Lua scripts, and instead, have everything in one script for easier management. Thank you for any help.
  6. Hi DaveG, Thank you for replying. Ughhh... too bad it isn't easier to relate a switch action in the add-on aircraft to something that FSUIPC recognizes! FSUIPC is such a great program, but I certainly understand this roadblock. It makes sense that there's no way to know what every add-on does under the hood. I'll probably give up on the fuel panel... too many other things to build. Thank you again!
  7. Hello, I'm using the IRIS Vulcan and planning to build a hardware fuel control panel. In the Vulcan, there are around 20 switches, or so, on this panel. Desktop Aviator (www.desktopaviator.com) has hardware cards that interface with FSUIPC and FSX, allowing one to build such a panel. I'm having trouble assigning a given hardware switch to the software fuel panel switches in the IRIS Vulcan software. In FSUIPC, the list of assignable values seem to be for the default FSX, and not for add-ons like the Vulcan. In other words, it does not list the 20+ fuel switches and their assignable states. Can anyone indicate how I can get FSUIPC to read the values that the IRIS Vulcan generates (i.e., Fuel Tank #3 Forward Pump = On, or something like that), so that I can assign it to the hardware switches? Thanks for any assistance. p.s. IRIS doesn't answer their tech support emails or Facebook, so I can't ask them. Thanks.
×
×
  • 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.