Black Ops III

ArrayGetClosest

Returns the entity/vector that is closest to the <origin> from the <array>.

Example:

ent = ArrayGetClosest( player.origin, a_enemies )

Parameters

ParameterSummary
*originThe origin to get closest from
*arrayThe array to search in
[dist]The minimum distance to check when finding closest (has to be positive)

* = mandatory