mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
27 lines
461 B
Plaintext
27 lines
461 B
Plaintext
/*
|
|
* Author: commy2
|
|
* Reports near units.
|
|
*
|
|
* Arguments:
|
|
* None
|
|
*
|
|
* Return Value:
|
|
* Near Units <ARRAY>
|
|
*
|
|
* Public: No
|
|
*/
|
|
#include "script_component.hpp"
|
|
|
|
private _camPosAGL = positionCameraToWorld [0, 0, 0];
|
|
|
|
// handle RHS / bugged vehicle slots
|
|
if !((_camPosAGL select 0) isEqualType 0) exitWith { [] };
|
|
|
|
private _nearUnits = [];
|
|
|
|
{
|
|
_nearUnits append crew _x;
|
|
} forEach nearestObjects [_camPosAGL, ["AllVehicles"], MAX_LASER_RANGE];
|
|
|
|
_nearUnits
|