The instance_nearest / instance_furthest functions include the calling object and only work with Cartesian distance. This can make checks on games (for state transitions, ranged weapons etc.) more difficult. Functions that extend this and make it easier can be implemented and can have the following signature:
instance_nearest_ext(x, y, obj, exclude_self = true, distance_function = distance_to_object)
instance_furthest_ext(x, y, obj, exclude_self = true, distance_function = distance_to_object)
The
instance_nearest / instance_furthest
functions include the calling object and only work with Cartesian distance. This can make checks on games (for state transitions, ranged weapons etc.) more difficult. Functions that extend this and make it easier can be implemented and can have the following signature: