Sticky point to list of points
GGB scripting
A=(1, 1)
B=(2, 1)
C=(3, 2)
D=(4, 2)
E=(5, 1)
list1 = {A,B, C, D, E}
eps = 1/2
F = (0, 0)
G = ClosestPoint(list1, F)
H = DynamicCoordinates(F, If(Distance(F, G) < eps, x(G), x(F)), If(Distance(F, G) < eps, y(G), y(F)))
Based upon Michael Borcherds's applet:
https://www.geogebra.org/m/prtSTvxt