Hello! i am RequiemZap, so let’s get straight to the point
i was working on my RTS Game Project (solo developing)
And i was improving the current Unit/Troop System
i had an issue making a formation system
Tried Using Grid System, has multiple issues (for i loops)
Image Examples: (stolen from google)
Part Of my Code:
TroopModule.MoveTroop = function(Player, TroopTable, Position)
for t, Troop in TroopTable do-- Troops in The troop table
if Troop.Data.Owner.Value ~= Player or Troop.Data.Command.Value == true then print('Not owner') return end
for i,Cframe in Position do -- cframes in position table
Troop.Humanoid:MoveTo(Cframe.Position)
task.spawn(function()
Troop.Humanoid.MoveToFinished:Wait()
Attack(Troop)
end)
end
-- TroopNet:Fire(Player,"ResetParts")
end
end
``` this is the code without formation setting