if (distance_to_object(instance_nearest(x, y, obj_item) <= 10))) { inst = instance_nearest(x, y, obj_item); }