jcleland 14 Posted July 1, 2016 I apologize if this is a dup, searched and debugging for a while and stuck. I'm trying to detect players, conscious or unconscious, within distance of a position. Using ACE 3, players that are unconscious are not returned by <position> nearEntities["Man", <distance>]; The documentation for nearEntitiesspecifies that only alive will be returned so I'm guessing that they are not considered alive. Is there a simple way to select all playable units using either nearObject or nearEntities, whether alive or dead? Tried nearObjects but no luck. More: In CfgVehicles, I don't see any other typeName for a dead player, it seems Man is the root of all of these types. Above this is Land which is pretty broad. I have considered using Land and filtering using BIS_fnc_conditionalSelect, but I'm not sure how to specify a unit that's alive... since they seem to be considered dead. Thank you in advance, James Edit: Got nearObjects and nearEntities reversed in the original post. nearEntities["Man",<distance>]; doesn't return knocked out players. Share this post Link to post Share on other sites
kylania 568 Posted July 1, 2016 Probably a nearEntities or just entities fed into a distance check then see if any of them have whatever variable ACE sets to mark someone as unconscious in their medical system. If you just need a list of players, not worried about distance, allPlayers should work. Share this post Link to post Share on other sites
jcleland 14 Posted July 1, 2016 Probably a nearEntities or just entities fed into a distance check then see if any of them have whatever variable ACE sets to mark someone as unconscious in their medical system. If you just need a list of players, not worried about distance, allPlayers should work. Thank you for the reply. I tried allPlayers as an argument to BIS_fnc_conditionalselect with the condition being {<position> distance _x < radius} but arma produced a lot of memory output and subsequently crashed. I don't think it would be too expensive to use something like: _players = [allPlayers, {_position distance _x < 100}] call BIS_fnc_conditionalSelect; where _position is the center of the area and 100m is the radius. The problem is, it's run a lot which might be why I'm seeing problems. I'll try it again and get a new rpt file. Share this post Link to post Share on other sites
kylania 568 Posted July 1, 2016 Wiki says select can do this now. _nearPlayers = allPlayers select {_position distance _x < 100}; Share this post Link to post Share on other sites
jcleland 14 Posted July 1, 2016 Wiki says select can do this now. _nearPlayers = allPlayers select {_position distance _x < 100}; Thanks, I'll try that next. The method mentioned in my previous reply doesn't work for some reason. I'm sure allPlayers is still returning players, but there's either something wrong with the condition or their returned position is not where the body is located... continuing to diag_log. Share this post Link to post Share on other sites