AlGrant -> Lua Question: Units Detach/Join Group (7/14/2017 10:22:25 AM)
|
Is there a way in Lua to detach units from a group and assign them to a new group ? In an AI controlled side I have a group with a carrier and a number of escorts, at some point I want to detach 3 of the escorts from the carrier Group and assign them to a new Group and then to a new mission. I have managed to get the actions I want by having the carrier group composed of 2 smaller groups, one with the escorts made relative to the carrier and then simply assign to a new mission .... it works and gets the results I'm looking for but but is a bit messy, so wondering if I can tidy things up a bit with Lua. I've no problems with checking the units are still active and assigning to a new mission, but can't seem to split them up if all part of the same group. Cheers Al
|
|
|
|