Garcia 0 Posted August 7, 2006 Ok, the problem is simple, I can't script functions for shit. So what I need is this. I've got an array of groups ([groupname1,groupname2,groupname3]), minimum 1 group, and max 5 groups will be in the array. I need a function that takes the array of groups, and adds every single unit from these groups to an array. i.e, I've got 2 groups with 2 units in each. Then the array that I get back from the function is [unit1,unit2,unit3,unit4]. Thanks in advance to anyone out the who possibly is willing to make this one for me Share this post Link to post Share on other sites
UNN 0 Posted August 7, 2006 Thats a nice quick one: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">private ["_grparray","_result"]; _GrpArray=_This Select 0; _Result=[]; {_Result=_Result+(Units _x)} ForEach _GrpArray; _Result Your ok with creating loading the sqf, aren't you? Share this post Link to post Share on other sites
Garcia 0 Posted August 7, 2006 Seems I know that at least, yes Thanks a lot, works like a charm Share this post Link to post Share on other sites