Math and Computation
Distance Functions
deceleration_distance(speed,friction) Returns the distance travelled by an object moving at the given speed with the given rate of deceleration.
instance_closest_approach(inst) Returns the closest distance that a given instance will approach the current instance.
instance_nth_farthest(x,y,obj,n) Returns the id of the nth farthest instance of type obj from (x,y).
instance_nth_nearest(x,y,obj,n) Returns the id of the nth nearest instance of type obj to (x,y).
point_line_distance(x1,y1,x2,y2,x3,y3,segment) Returns the distance from a given point to a given line.
range_finder(x,y,dir,range,object,prec,notme) Returns the exact distance to the nearest instance of the given object in the given direction from the given point.