dimon 32 Posted March 17, 2015 (edited) Creating an array of positions spiral manner fnc_spiral faced with the problem of how to group on the course. Writing a script for their needs how would you solve your problem: ffa_fnc_arrays_dist Thanks ArseniyK, I did a function that splits the array into subarrays by the method of k-means clustering I led them to a practical mind (i.e. they do work in MP mission) and a bit of optimizing standard techniques. 1. option ffa_fnc_kmean_clustering arrays= [12,arrays] call ffa_fnc_kmean_clustering; weed out the empty submassive get ffa_fnc_otsev= { _cnt = _this select 1; _array = []; { if (typeName _x == "ARRAY" && {(count _x) > _cnt}) then { _array set [count _array,_x]; }; } foreach (_this select 0); }; arrays= [arrays,0] call ffa_fnc_otsev; 2. option (more is better) ffa_fnc_kmean_clustering2 Credits: -ArseniyK Edited March 17, 2015 by Dimon Share this post Link to post Share on other sites