Adjusting Fuel Load (Full Version)

All Forums >> [New Releases from Matrix Games] >> Command: Modern Operations series



Message


Sybaris -> Adjusting Fuel Load (10/31/2021 2:12:44 PM)

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.




AndrewJ -> RE: Adjusting Fuel Load (10/31/2021 2:54:24 PM)

You can do this if you load the scenario in the editor.

Editor > Unit Actions > Set Fuel Qty and Airborne Time

[img]https://i.imgur.com/YLRFTdA.png[/img]




goldfinger35 -> RE: Adjusting Fuel Load (10/31/2021 2:56:04 PM)

You mean mission editor, select unit, top menu editor-unit actions-set unit fuel qty ?

edit: AndrewJ was faster [:)]




Sybaris -> RE: Adjusting Fuel Load (10/31/2021 3:07:36 PM)

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.




stilesw -> RE: Adjusting Fuel Load (10/31/2021 7:57:31 PM)

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




Bashkire -> RE: Adjusting Fuel Load (10/31/2021 8:42:26 PM)


quote:

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!




KnightHawk75 -> RE: Adjusting Fuel Load (11/3/2021 4:23:43 AM)

quote:

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.






Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
1.078125