ale wtedy będzie skakał od razu na wyznaczony x,nie lepiej będzie dać mu
direction = point_direction(x,y,(instance_nearest(x,y,pilka)).x,y); speed = 3
@edit
GML
target_x = (instance_nearest(x,y,pilka)).x
direction = point_direction(x,y,target_x,y)
if(distance_to_point(target_x,y) < 2) speed = 3
else speed = 0