Jump to content
Sign in to follow this  
falconx1

count aall east vehicles?

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 this post


Link to post
Share on other sites

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
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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×