A quick and dirty way to get AI patrols to infinitely refuel/ream when low on fuel and then continue their mission in DCS.
Youtube doesn't allow angled brackets, replace *LOWER THAN* with the actual symbol.
-------------------------------------------------------------------------------------------------------------------
flight = 'CAP-1'
bingoFuel = 0.5
if Group.getByName(flight) then
for i, unitObject in pairs(Group.getByName(flight):getUnits()) do
if Unit.getFuel(unitObject) *LOWER THAN* bingoFuel then
return true
end
end
end
return false