Danidan 17 Posted May 20, 2018 Hello, I need help. I have 3 marker on the map and he switch in blue or red. I want to count red and blue marker at end of the game. But i Don't count colored marker? _count= count [MarkerColor "Colorred" == zonec, zoneb,zonea]; hint str _count; I count 3 but i have only one red marker!? Thank's Share this post Link to post Share on other sites
beno_83au 1362 Posted May 20, 2018 _countRed = {getMarkerColor _x == "ColorRed"} count ["marker_1","marker_2","marker_3"]; _countBlue = {getMarkerColor _x == "ColorBlue"} count ["marker_1","marker_2","marker_3"]; hint format["Red - %1/nBlue - %2",_countRed,_countBlue]; Have a read of these to understand what's going on here: getMarkerColor (and CfgMarkerColors_Arma_3 for the colours) count hint format Also, marker_# being the marker names.I assume yours are zone# but I went with generic names just for simplicity. Untested, but should work. 3 Share this post Link to post Share on other sites
Danidan 17 Posted May 22, 2018 Hello! Thank you for your help it is very considerable for a noob! On the other hand I do not manage to do what I want with this script. I have that this who in the air to work but how I can improve him because he seems to me very rustic. while { getMarkerColor "zonec" == "ColorRed"} do { [6, true] call omtk_setFlagResult; }; if (getMarkerColor "zonec" == "ColorBlue") exitWith {[6, false] call omtk_setFlagResult;}; waitUntil { sleep 0.00051; call omtk_sb_compute_scoreboard; call omtk_sb_start_mission_end; }; while { getMarkerColor "zonec" == "ColorBlue"} do { [5, true] call omtk_setFlagResult; }; if (getMarkerColor "zonec" == "ColorRed") exitWith {[5, false] call omtk_setFlagResult;}; waitUntil { sleep 0.00051; call omtk_sb_compute_scoreboard; call omtk_sb_start_mission_end; }; I do not know if I can simplify him(it)? I need to throw(launch) it to the end of the mission when the scordbord is thrown(launched). And the area can change every 30Sc. I don't if the "sleep" are at the right place? I while make "zonea", "zoneb", ect…. Share this post Link to post Share on other sites
xjoker_ 25 Posted May 23, 2018 we can't help you if we don't know what you're trying to do and if you don't provide the code of your functions (omtk_xxxxxx). By the way a while / do without a sleep inside is not a good idea most of the time. And exitWith will stop your script before the end, i don't know if it's what you want. Share this post Link to post Share on other sites