

_group = _this select 0

_vehicle = _this select 1

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

_Lpos = getpos _vehicle
_dir = (getdir _vehicle) + 90

_r = 0

#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, (_Lpos select 2)+ 8]

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

{dostop _x} foreach units _group

;{_x disableAI "TARGET"} foreach units _group


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

exit






