Blitzen88 16 Posted October 11, 2021 Good morning, Im trying to figure out how to remove units that are in a vehicle from an array. I feel like this is probably an easy solution but my little brain cant figure it out. This is what I have: //Define the Group _PlayersGroup = group player; //Remove the player from the array _PlayerSquadMates = (units _PlayersGroup - [player]); //Remove units which are in a vehicle: _PlayerSquadMates = _PlayerSquadMates – Units in a vehicle //Have the filtered units call the function { [_x, blah blah blah] spawn Example_fnc_FunctionName } foreach _PlayerSquadMates; Share this post Link to post Share on other sites
pierremgi 4739 Posted October 11, 2021 private _playerSquadMates = units player select {!isPlayer _x && isNull objectParent _x}; //not a player, not in a vehicle, even parachute) Share this post Link to post Share on other sites
Blitzen88 16 Posted October 11, 2021 1 hour ago, pierremgi said: private _playerSquadMates = units player select {!isPlayer _x && isNull objectParent _x}; //not a player, not in a vehicle, even parachute) Does this need to be units group player instead of units player? Just curious because Im stuck at work and cant test stuff right now. Share this post Link to post Share on other sites
pierremgi 4739 Posted October 11, 2021 The answer is in BIKI (example 4) Share this post Link to post Share on other sites