Urgent! progressive elimination of points to create polyline

I have a series of points and im trying to create a polyline that connects each time with one point less, as it develops its height. So on ground floor, i will have all (4) points connected, on first floor i would have 3 points connected, on second floor i would have 2 points connected, etc (image 02). Ideally, i would need these to be able to change, so that if i have more points and more floors, the system still works. Furthermore, each poly line should trim the vertical segment it affects (image 03). Image 01 is the floorplan of the system. Image 04 is what i get out of my gh…
I need this really urgently, any recommendations?

dj_question01.gh (13.7 KB)


Assigned to Grasshopper category.

Hi, see if this helps.

DJ.gh (10.6 KB)