You are currently viewing the GMLscripts.com static mirror. Forum access and script submissions are not available through this mirror.

Invert GMLscripts.com

instance_nearest_notme

Returns the nearest instance to a given point, disregarding the calling instance.

instance_nearest_notme(x,y,obj)
Returns the nearest instance to a given point, disregarding the calling instance.
COPY/// instance_nearest_notme(x,y,obj)
//
//  Returns the nearest instance to a given point,
//  disregarding the calling instance.
//
//      x,y         position, real
//      obj         object instance to find, real
//
//  GMLscripts.com/license
{
    instance_deactivate_object(self);
    var n = instance_nearest(argument0, argument1, argument2);
    instance_activate_object(self);
    return n;
}

Contributors: iFredQC

GitHub: View · Commits · Blame · Raw