falconx1 13 Posted July 18, 2013 im trying to count all vehicles on east _CountEast = {side _x == opfor} count allUnits; _CountW = {side _x == west} count allUnits; _CountG = {side _x == independent} count allUnits; _totalUnits = _CountG + _CountW; _ALL_East_Vehicles = //? if (_x isKindOf "tank" || _x isKindOf "Car") then { //do sleep 30; }; Share this post Link to post Share on other sites
cuel 25 Posted July 18, 2013 quick reply, untested. _CountEast = {side _x == opfor} count allUnits; _CountW = {side _x == west} count allUnits; _CountG = {side _x == independent} count allUnits; _totalUnits = _CountG + _CountW; _ALL_East_Vehicles = [] { if ((vehicle _x) isKindOf "tank" || (vehicle _x) isKindOf "Car" && (!((vehicle _x) in _ALL_East_Vehicles))) then { _ALL_East_Vehicles set [count _ALL_East_Vehicles,_x] }; }forEach _CountEast Share this post Link to post Share on other sites
Tatar 10 Posted July 18, 2013 im trying to count all vehicles on east _CountEast = {side _x == opfor} count allUnits; _CountW = {side _x == west} count allUnits; _CountG = {side _x == independent} count allUnits; _totalUnits = _CountG + _CountW; _ALL_East_Vehicles = //? if (_x isKindOf "tank" || _x isKindOf "Car") then { //do sleep 30; }; hi _countEastVehicles = { side _x == east } count vehicles; _eastVehiclesInArray = []; { if (side _x == east) then { _eastVehiclesInArray set [count _eastVehiclesInArray, _x]; }; } forEach vehicles; Share this post Link to post Share on other sites