Page 1 of 1

Adjusting Fuel Load

Posted: Sun Oct 31, 2021 11:12 am
by Sybaris
For the life of me I thought there was either a menu item or LUA script where you could adjust the fuel load of airborne aircraft. I have read where that was a update in a previous CMANO version. I can't find how to do that anywhere though. Any help much appreciated.

RE: Adjusting Fuel Load

Posted: Sun Oct 31, 2021 11:54 am
by AndrewJ
You can do this if you load the scenario in the editor.

Editor > Unit Actions > Set Fuel Qty and Airborne Time

Image

RE: Adjusting Fuel Load

Posted: Sun Oct 31, 2021 11:56 am
by goldfinger35
You mean mission editor, select unit, top menu editor-unit actions-set unit fuel qty ?

edit: AndrewJ was faster [:)]

RE: Adjusting Fuel Load

Posted: Sun Oct 31, 2021 12:07 pm
by Sybaris
That's the one but it is grayed out and not functional in the menu when I have a unit hooked.

Nevermind. I was trying to do it to a formation but now I can't get them to regroup!

---------------

Got them to regroup. Apparently one or more wasn't detached from something else or something so I had to individually detach and regroup.

RE: Adjusting Fuel Load

Posted: Sun Oct 31, 2021 4:57 pm
by stilesw
Sybaris,

You can also accomplish this "on the fly" using Lua. An example: [.... are used for spacing not in the code]

function Fillup3001( side, name )
{
u = ScenEdit_GetUnit({side=USA,name=name OR Guid})
if u ~= nil then
....local newfuel = u.fuel
....if newfuel.current < 300 [whatever the max fuel amount actually is] then
........newfuel.current = newfuel.max
........u.fuel = newfuel
....end
end
}

This function should be triggered at regular intervals, say every 15min.

-WS

RE: Adjusting Fuel Load

Posted: Sun Oct 31, 2021 5:42 pm
by Bashkire
ORIGINAL: Sybaris
...I was trying to do it to a formation...

I was today years old when I realised how to use this menu option. I've been doing it to groups all this time and I never even knew. Thanks for saying that, otherwise I'd have never known why that function wasn't working!

RE: Adjusting Fuel Load

Posted: Wed Nov 03, 2021 1:23 am
by KnightHawk75
ORIGINAL: Sybaris

That's the one but it is grayed out and not functional in the menu when I have a unit hooked.

Nevermind. I was trying to do it to a formation but now I can't get them to regroup!

---------------

Got them to regroup. Apparently one or more wasn't detached from something else or something so I had to individually detach and regroup.
Just switch to unit view next time, no need to de-group them to select the individual unit.

Also floating around here is a refuel selected units script from me somewhere you can plop into a special action so you can also just select a bunch of units if you want and refuel what's selected. If you select a group, it'll handle doing each unit for you.
https://www.matrixgames.com/forums/tm.asp?m=4826182 (post #2 attachment)

In the Lua forums you can also find recent post by me that had code similar to #5 but if for application more widely based on a side... like go refuel all blue aircraft with DBID 12345.