Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- unitgroup CreateUnitsInCircle (int quantity, string id, int player, point center, fixed radius, fixed polarAnchor, fixed faceAnchor)
- {
- // Local variables
- unitgroup g = UnitGroupEmpty();
- int count = 0;
- fixed angle = (360.0 / IntToFixed(quantity));
- fixed adjust;
- // While count is less than quantity, create units
- while (count < quantity)
- {
- adjust = count * angle;
- UnitGroupAddUnitGroup(g,UnitCreate(1,id,c_unitCreateIgnorePlacement,player,PointWithOffsetPolar(center,radius,polarAnchor-adjust),faceAnchor-adjust));
- count+=1;
- }
- return g;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement