## Recommended Posts

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 on other sites

```_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 on other sites
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;
```