gizz46 28 Posted March 20, 2013 (edited) Hi everybody , :) im working on an addon and i have a general question about units. i want to select a specific units from the players group. As example lets take Unit 2 and 5 from the players group. BIS_MENU_GroupCommunication = [ ["Menu", true], ["Menu", [0], "#USER:myMenu",-2, [["expression", ""]], "1", "IsLeader" ], ["",[],"",-1,[],"0","0"], ["Team select", [0], "RscSelectTeam",-5, [["expression", ""]], "1", "IsLeader" ], ["Assing Team", [0], "RscTeam",-2, [["expression", ""]], "1", "IsLeader" ], ["",[],"",-1,[],"0","0"], if((count Units group Player-1) >= 1 ) then {(["F1", [0], "",-5, [["expression", "player execVM 'selectunit.sqf'"]], "1", "1" ])}, if((count Units group Player-1) >= 2 ) then {(["F2", [0], "#USER:BIS_MENU_GroupCommunication",-4, [["expression", ""]], "1", "1" ])}, if((count Units group Player-1) >= 3 ) then {(["F3", [0], "#USER:BIS_MENU_GroupCommunication",-4, [["expression", ""]], "1", "1" ])}, if((count Units group Player-1) >= 4 ) then {(["F4", [0], "#USER:BIS_MENU_GroupCommunication",-4, [["expression", ""]], "1", "1" ])}, if((count Units group Player-1) >= 5 ) then {(["F5", [0], "#USER:BIS_MENU_GroupCommunication",-4, [["expression", ""]], "1", "1" ])}, if((count Units group Player-1) >= 6 ) then {(["F6", [0], "#USER:BIS_MENU_GroupCommunication",-4, [["expression", ""]], "1", "1" ])}, if((count Units group Player-1) >= 7 ) then {(["F7", [0], "#USER:BIS_MENU_GroupCommunication",-4, [["expression", ""]], "1", "1" ])}, if((count Units group Player-1) >= 8 ) then {(["F8", [0], "#USER:BIS_MENU_GroupCommunication",-4, [["expression", ""]], "1", "1" ])}, if((count Units group Player-1) >= 9 ) then {(["F9", [0], "#USER:BIS_MENU_GroupCommunication",-4, [["expression", ""]], "1", "1" ])}, if((count Units group Player-1) >= 10 )then {(["F10", [0], "#USER:BIS_MENU_GroupCommunication",-4, [["expression", ""]], "1", "1" ])}, ["",[],"",-1,[],"0","0"], ["Formations", [0], "RscFormations",-5, [["expression", ""]], "1", "1" ] ]; showCommandingMenu "#USER:BIS_MENU_GroupCommunication"; with {player GroupselectUnit [_Unit,true]} forEach Unit group player; i can select all units. what have i to write in the selectunit.sqf to select just unit 2 or so. :confused: Im novice at scripting so every help is appreciated thanks for your help :) Edited March 21, 2013 by gizz46 Share this post Link to post Share on other sites
gizz46 28 Posted March 21, 2013 (edited) for a better understanding of my problem i uploaded a few pictures. http://i1322.photobucket.com/albums/u566/gizzygamez46/hudbild_zpsc7e4cadd.png (1143 kB) http://i1322.photobucket.com/albums/u566/gizzygamez46/hudbild2_zps4cd61634.png (1111 kB) my gues is that i have to count all units in the group into an array. Edited March 21, 2013 by gizz46 Share this post Link to post Share on other sites