Finding working code can be a chore, so I wanted to share this code. This script creates a ferry mission, sets the flight size to a single airframe, and then creates a series of air units through a loop that will then deploy to that base, from their home base. This specific situation is the remainder [units #7 through #12] of the RAF No. 3 Fighter Squadron (Eurofighter Typhoon) deploying from their home base at RAF Coningsby to a forward deployed air base in Bulgaria. You can adjust this for your own bases and aircraft.
Code: Select all
ScenEdit_AddMission('NATO','Ferry to Bezmer AB Bulgaria','Ferry',{destination='Bezmer AB Bulgaria'})
ScenEdit_SetMission('NATO','Ferry to Bezmer AB Bulgaria', {FlightSize=1, UseFlightSize=false})
for x = 7, 12, 1 do
local callsign = "Thirds #"..x
ScenEdit_AddUnit({type ='Air', unitname=callsign, loadoutid =771, dbid =4948, side ='NATO', base ='RAF Coningsby', mission ='Ferry to Bezmer AB Bulgaria'})
ScenEdit_SetUnit({side='NATO', unitname=callsign, base ='Bezmer AB Bulgaria'})
end