if zone["Coalition"] == 1 then
if maybeFarp then
maybeFarp:setCoalition(1)
else
coalition.addGroup(country.id.RUSSIA, -1, Farp(zone["Name"], farpX, farpY))
local farp = StaticObject.getByName(zone["Name"].." FARP")
if farp then
farp:autoCapture(false)
farp:setCoalition(1)
local farpWarehouse = farp:getWarehouse()
for weaponName, weaponAmount in pairs(farpWeapons) do
farpWarehouse:setItem(weaponName, weaponAmount)
end
for _, fuel in ipairs(farpLiquids) do
farpWarehouse:setLiquidAmount(fuel.Type, fuel.Amount)
end
end
end
coalition.addStaticObject(country.id.RUSSIA, FarpAmmoDepot(zone["Name"], ammoX, ammoY))
coalition.addStaticObject(country.id.RUSSIA, FarpCommandPost(zone["Name"], commandX, commandY))
coalition.addStaticObject(country.id.RUSSIA, FarpFuelDepot(zone["Name"], fuelX, fuelY))
In my dynamic mission I'm able to change farp coalitions and set or remove items from it and the farps work.