Hi, I’m heading over to our sim this afternoon to try out the scripting. I think I get the programming part where I isolate the correct bit for determining status of the switch and looping thru the switches. Beein a FSUIPC noviceI’m a little confused about the controls and parameters. Here is a part of your template with a ipc.control statement inserted.
while j < Switches do if logic.And(Buttons, buttonbit) ~ 0 then -- Button 1, Master ALT = ON ipc.control(66242, 1) ipc.log("Master ALT set to ON") -- E.G ipc.control, or ipc.keypress, or ipc.runlua, or ipc.macro, etc. else -- Button 1, Master ALT = OFF ipc.control(66242, 0) ipc.log("Master ALT set to OFF") -- E.G ipc.control, or ipc.keypress, or ipc.runlua, or ipc.macro, etc. end
Is it possible to control a toggle in this manner? Or will it just go to the opposite state whenever it’s invoked. Many of the controls I need exist only as a toggle.
Regards
Frode