August 17, 20178 yr Hi, has anyone already created a script of Blackbox A330? I like to fly this plane very much and want to use a few switches.
August 29, 20178 yr Author I tried something. But it does not work. What could be the error? function Batterie_1_on () LVarSet = "L:BB_OH_ELEC_BAT1_Lower" val = 1 if ipc.readLvar(LVarSet) == 1 then val = 0 end ipc.writeLvar(LVarSet, val) end function Batterie_1_off () LVarSet = "L:BB_OH_ELEC_BAT1_Lower" val = 0 if ipc.readLvar(LVarSet) == 0 then val = 1 end ipc.writeLvar(LVarSet, val) end The switch is unfortunately no function.
August 29, 20178 yr The functions look good syntactically but without access to the aircraft addon I cannot advise on why they are not working. The best way to start with any function is to use the Tracer to watch and monitor Lvars and use the toggle facility to see the effect of changing the value. Once you have proven the states that work then is time to write the code. One mistake I keep doing is that the test if/then is in the wrong sense. You should also use the _loggg() (verbose) to output to the console (and FSUIPCX.log) the values of the Lvar you are using at each stage of the function. 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
September 28, 20178 yr Author Hello, when I come with Linda Tracer all the functions comes this: LUA.0: [L] LVar: BB_XML_EVENT = 118854 LUA.0: [L] LVar: BB_XML_EVENT = 0 LUA.0: [L] LVar: BB_OH_ELEC_BAT1_Lower = 1 LUA.0: [L] LVar: BB_XML_LASTEVENT = 118854 LUA.0: [L] LVar: BB_XML_LASTEVENT = 0 LUA.0: [L] LVar: BB_OH_ELEC_BAT1_Lower = 0 This is shown to me when I press and release this one button. Can it be that my script so can not function? How do I write my script so it works?
October 3, 20178 yr Hi A330neo For anyone to help you would require access to the BB 330 which I do not. The Lvars you listed mean nothing without such access. Without a SDK for the aircraft and a lot of spare time there is no way of offering you support. Sorry. 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
Archived
This topic is now archived and is closed to further replies.