- The engine already has the info internally (for HUD/radar/3d unit icons/target decision making)
- To compute it via sqf is very slow (intersect checks or checkVisibilty)
Minimum for the player, better for any unit, useful for the whole group.
- returnIsSortedBy //enum [not,distance ,cost/threat]
Return value could be simply the list of visible targets (array). One could replicate the return from targetsQuery, but then would need parameters to disable it partially/altogether for the most efficient variant.
- hidden and not simulated should not be in the list in case the engine doesnt filter them out already
- It might be more efficient to have a separate SQF command for radar targets vs visible targets