I’ve never done it, but I’ll tell you as I imagine it:
- you have an array of vectors that corresponds to your formation location settings (like 0;0;0 then 200;0;0 and so on and so forth)
- when the move order is received, it corresponds to the world location of the player’s hit cursor, take that location
- for each unit in the unit group, apply one of the index in your array of vectors to the stored location (verify if it’s a valid AI location, if not do something about it)
- give each unit in the group one of the modified location to go to (AIMoveTo node directed to that location)