Help Debugging Attractor Point

Need help debugging the attractor point in this script! I want to be able to drag the centrepoints of rectangles around based on the location of the attractor point, but the code is currently not moving my array of points. I have one version with a scattered (read: random) array of points, and one that is based on a surface division. Ideally the script will work on non-rectangular polygons. I drew a complex polygon to represent a building facade.

I attached a Rhino file with a complex curve to use as an example, and the scattered and surface division versions of the attractor point file.

Thank you!
attScatter_01.1.gh (16.1 KB)
attArray_01.1.gh (16.4 KB)
For Debugging.3dm (25.9 KB)

Hi
You didin’t internalised your referenced curve.

I know; I want it to be able to work for any curve I draw in Rhino. I set the curve in the very first command (not tidy, I know, but it works for what I need it to do).

And that is fine - but when you ask a question on the forum, you should try to minimize the amount of work other have to do to help you. Therefore, when you post a GH definition, make sure to clean up your definition so that only necessary components remain, AND internalize any Rhino geometry that is used as input. Always.
Cheers,
wim

I edited the files, thank you for letting me know.

Hi
Is something you need like this?
https://aws1.discourse-cdn.com/mcneel/uploads/default/original/3X/0/d/0d486fff335a283500eb87be600f5c601d8e0769.mp4 attArray_test.gh (15.1 KB)