Jump to content

Export.lua : getting F-18C fuel quantity


Recommended Posts

Posted

Hello,

I'm trying to get the function for F-18C fuel quantity in the export.lua.

i've already managed to get the fuel quantity for Ka-50 with this code:

(export.lua)
local MainPanel = GetDevice(0)
BS_Fuel_REAR = MainPanel:get_argument_value(138) *800 -- "%.4f"{0.0,1.0}
BS_Fuel_FWD = MainPanel:get_argument_value(137) *800 -- "%.4f"{0.0,1.0}
BS_FuelTotal = BS_Fuel_FWD + BS_Fuel_REAR

So the fuel are index 137 and 138 for the Ka-50 (multiply by 800 because each tank is 800 kgs if I remember well)

From "\Mods\aircraft\Ka-50\Cockpit\Scripts\mainpanel_init.lua" these sections helped me:

-- Fuel tanks
ForwardTankAmount						= CreateGauge()
ForwardTankAmount.arg_number			= 137
ForwardTankAmount.input					= {0.0, 1.0}
ForwardTankAmount.output				= {0.0, 1.0}
ForwardTankAmount.controller			= controllers.ForwardTankAmount

RearTankAmount							= CreateGauge()
RearTankAmount.arg_number				= 138
RearTankAmount.input					= {0.0, 1.0}
RearTankAmount.output					= {0.0, 1.0}
RearTankAmount.controller				= controllers.RearTankAmount

But this is missing for the F-18C and I can't find how to get the current fuel quantity for the F18-C, i've read some of the scripts of DCS-BIOS but can't find what would be usefull for this case. Any help very appreciated.

L'important n'est pas de tuer, mais de survivre.

[sIGPIC][/sIGPIC]

 

 

 

if you read this you are too curious

 

 

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...