djukel 0 Posted September 1, 2004 Hi! A group consist only soldiers from "man" unittype, and sometimes soldiers occupy various empty vehicles. Question: How can I count the vehicles in a group? Is there a script somewhere do the similar thing? Share this post Link to post Share on other sites
xezon 0 Posted September 1, 2004 You have to ckeck in an ordner if anyone is in a vehicle, then compare the vehicles if there are duplicates to get the right vehicle count. Share this post Link to post Share on other sites
Romolus 0 Posted September 1, 2004 <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_vehicleList = [] {if ( (vehicle _x != _x) and (not ((vehicle _x) in _vehicleList)) ) then {_vehicleList = _vehicleList + [vehicle _x]}} forEach units _group _vehicleCount = count _vehicleList Share this post Link to post Share on other sites
djukel 0 Posted September 1, 2004 Thanks! It is working fine. Share this post Link to post Share on other sites