Different heights and attractor lines

Hi,
I’m working on a project where I need to assign different heights to courtyard buildings. Furthermore, I would like some of these buildings, confined to the outside, to follow a specific attractor axis (the external road). Could anyone suggest an approach or component in Grasshopper that would allow me to accomplish this setup?