Hi guys,
I am trying to copy route points from a group object (plane) to others on mission start.
I trying to do like that:
local copy = true
local squadrons = {
"Bear",
"Falcon"
}
if copy == true then
group1 = GROUP:FindByName("viper")
local route = group1:CopyRoute(1, 0, false, 0)
for i,squad in pair(squadrons) do
local group2 = GROUP:FindByName(squad)
group2:Route(route, 1)
end
end
Is that a correct aproach?
Another problem is that when i run group1 = GROUP:FindByName..., i am getting "attempt to index global 'group1' (a nil value)" in DCS log despite the moose.lua file being correctly loaded (dcs log tells that moose is loaded).