PDA

View Full Version : Question about fuel consumed in fly.


HR_Grainovich
06-20-2013, 06:01 AM
Hi comrades!!

I have a questiĆ³n about the CloD's API, I would appreciate any help, please ;)

It's about the fuel amount in a plane, when you create a aircraft you can know the total amount of fuel with:

aircraft.getParameter(-1, part.ParameterTypes.S_FuelReserve);

This code return all kilos of fuel in the all tanks of the plane (it's supposed...), but... when you are flying along the mission and execute the same code, the amount is equals! :(

May be... the program not discount the fuel consumption?? , it's impossible to know the fuel consumption with this function?

Thank you very much for your help! ;)

HR_Grainovich
06-21-2013, 09:11 AM
May be, this is not the correct forum... I should post this in CoD Multiplayer?

bolox
06-21-2013, 09:53 AM
This probably is the right place- it's just very slow here now, and very few ever bother to look in the fmb section.

I'm not an expert on the C# coding but one thing that strikes me is you are using the SYSTEM readings, have you tried the instrument reading?
[Inst: Fuel Reserve]
/// <para>Returns fuel level indicator reading.</para>
/// <para>Generic subtype (-1) shows combined reading in all tanks / controlled by selector switch;</para>
/// <para>Other subtypes point to fuel tank number in machine's list.</para>
/// </summary>
I_FuelReserve,

I've not played with fuel levels to work out consumption, but the Instrument values seem to work- with the possible exception of the compass which is reported to be non functional.


If this doesn't help it might be worth asking over at ATAG forums
http://theairtacticalassaultgroup.com/forum/forum.php
which is pretty much the place to go CoD wise these days

HR_Grainovich
06-21-2013, 07:03 PM
Hi bolox!!

I appreciate so much your help!

You are right, but I_FuelReserve only works in machines clients-server, not in dedicated server, for some reason.... no I_parameter works in dedicated server :confused:

I goint to search in TF forum!! really, thanks for your help!! ;)

bolox
06-21-2013, 07:45 PM
no I_parameter works in dedicated server

ah!, I have no knowledge of MP, but I'm pretty sure this is to prevent any possibility of cheating online.
I would recommend mentioning the dedi server part, and perhaps a full description of exactly what you are trying to acheive, 'little' details like this can change what/how things are possible

HR_Grainovich
06-22-2013, 06:55 AM
Thanks Bolox ;)

gihugo1
04-11-2015, 06:08 PM
Hey HR_Grainovich , is to prevent any possibility of cheating online ? Or what did u find out? Am having trouble with my CloD's AP.:confused:





http://ninjavsvitamix.com/