Jump to content
Tory Xiao

How to get every player that not in target player's team?

Recommended Posts

forEach (playableUnits - [player]);

I use this to get the array containing all players other than the target player

side group _hacked isEqualTo playerSide

and use this to tell if a player is in the target player's group

But how do I get the array that contains every player that is not in the target player's group?

Share this post


Link to post
Share on other sites

Just off the dome here, but maybe something like:

_grpPlayers = units group player arrayIntersect playableUnits;
_notInPlayerGrp = playableUnits - _grpPlayers;

 

  • Like 2

Share this post


Link to post
Share on other sites

If by team you mean group you could do:

private _notOnMyGroup = [];
_notOnMyGroup = allPlayers select { group _x isNotEqualTo group player };
_notOnMyGroup //every player not in player's group

 

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

×