

_group = _this select 0

_vehicle = (units _group) select 0

_formationX = [0 , 2 , -2 , 4 , -4 , 6 , -6 , 8 , -8 , 10]
_formationY = [0 , 1.5 , 1.5 , 0 , 0 , 1.5 , 1.5 , 0 , 0 , 1.5]

_Lpos = getpos _vehicle
_dir = getdir _vehicle

_r = 1

#placing

~0.01

_x = (_formationX) select _r
_y = (_formationY) select _r

_rad = ((_x ^ 2) + (_y ^ 2)) ^ .5
_Fdir = _x atan2 _y
_Cdir = _Fdir + _dir

((units _group) select _r) setPos [(_Lpos select 0) + (sin _Cdir) * _rad, (_Lpos select 1) + (cos _Cdir) * _rad]

_r = _r + 1
? (_r < count units _group) : goto "placing"

;_group1 = [_group] - [leader _group]

;{dostop _x} foreach [_group1]
{dostop _x} foreach units _group

{_x disableAI "TARGET"} foreach units _group


"_x addeventhandler [{fired},{(_this select 0) switchmove {combattocrouch}}]" foreach units _group

exit






