Mission Switch
Posted: Thu Mar 25, 2021 6:07 pm
I'm wondering if there is a slicker way of doing a mission switch for units.
I've been using the following type code which works quite well and is simple enough:
---------------
for i=1,2 do
if ScenEdit_GetUnit({Side='NATO Support', Name="No.101 Sqn RAF #"..i,}) ~= nil then
ScenEdit_AssignUnitToMission("No.101 Sqn RAF #"..i, "Tanker Kef")
end
end
--------------
I am setting up a series of mission where 3 different groups of bombers first marshal and then on a trigger switch to a strike mission. So it is easy enough to do 3 different commands as above but is there a way of saying:
All units assigned to Mission X change to mission Y?
Thanks
B
I've been using the following type code which works quite well and is simple enough:
---------------
for i=1,2 do
if ScenEdit_GetUnit({Side='NATO Support', Name="No.101 Sqn RAF #"..i,}) ~= nil then
ScenEdit_AssignUnitToMission("No.101 Sqn RAF #"..i, "Tanker Kef")
end
end
--------------
I am setting up a series of mission where 3 different groups of bombers first marshal and then on a trigger switch to a strike mission. So it is easy enough to do 3 different commands as above but is there a way of saying:
All units assigned to Mission X change to mission Y?
Thanks
B