Jump to content
Sign in to follow this  
pcc

Count group size from BIS_fnc_spawnVehicle units

Recommended Posts

I'm trying to count the group size "west" of vehicle spawned by BIS_fnc_spawnVehicle so that it stop after reaching a certain amount. 

if (side _team == west && (count units group west < 3)) then
{
aircrafts = [[((Position _base select 0) + sin (random 360) * (random 50)), ((Position _base select 1) + cos (random 360) * (random 50))], (_dir), "A10", west] call BIS_fnc_spawnVehicle;
...

but I'm getting this error

 Error position: <group west < 3)) then
  Error group: Type Side, expected Object

 

Share this post


Link to post
Share on other sites

I'm using this in Mission_CaptureAI.sqf, does count group _team return the size  of warfare AI team, or the A10 team?

Share this post


Link to post
Share on other sites

It will return whichever is defined as _team in the script, I would think it would be the Warfare AI team.  But I don't know what custom you've added.  West is a side, it can't be used as a variable identifying a team.  Something like West1 or grpWest can be used to identify a team.

  • Like 1

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  

×