RTB Question
Posted: Wed Jun 10, 2020 10:59 pm
I've got the following script working well but there is something missing:
----Change units to NATO Sp
for i=1,19 do
if ScenEdit_GetUnit({Side='NATO', Name="113rd FS Racers #"..i,}) ~= nil then
ScenEdit_SetUnitSide({Side='NATO', Name="113rd FS Racers #"..i, newside='NATO Sp'})
ScenEdit_SetUnit({side="NATO Sp", unitname="113rd FS Racers #"..i, RTB = True})
ScenEdit_AssignUnitToMission("113rd FS Racers #"..i, "Patrick Ferry")
end
end
So this changes a group of units to a different side after checking that they are still alive. Then they're told to RTB and for added measure set to a ferry mission to their home base.
All this is working but they continue on to their next waypoint before assuming the RTB and Ferry mission. I would like them to turn for home immediately. Not sure how to do that except maybe set up a waypoint next to the base and set the course to that.
Any thoughts
Tx
----Change units to NATO Sp
for i=1,19 do
if ScenEdit_GetUnit({Side='NATO', Name="113rd FS Racers #"..i,}) ~= nil then
ScenEdit_SetUnitSide({Side='NATO', Name="113rd FS Racers #"..i, newside='NATO Sp'})
ScenEdit_SetUnit({side="NATO Sp", unitname="113rd FS Racers #"..i, RTB = True})
ScenEdit_AssignUnitToMission("113rd FS Racers #"..i, "Patrick Ferry")
end
end
So this changes a group of units to a different side after checking that they are still alive. Then they're told to RTB and for added measure set to a ferry mission to their home base.
All this is working but they continue on to their next waypoint before assuming the RTB and Ferry mission. I would like them to turn for home immediately. Not sure how to do that except maybe set up a waypoint next to the base and set the course to that.
Any thoughts
Tx