Hi there,
1) It seems like you want roofHip() for the rear part and roofGable() for the front part. Maybe you could make both roofs, split them in half, and use the gable roof for the first half and the hip roof for the second half.
2) You could use comp(v) to get the vertices and insert primitive cubes there.
CreateCornersFromMass -->
comp(f) { bottom: comp(v) { all: Vertex } }
Vertex -->
alignScopeToAxes(y)
primitiveCube
s(w, h, w)
center(xz)
r(scopeCenter, 0, 45, 0)
Or, you could just insert primitiveCubes, use t() and r() to position them and rotate them. You could use scope.sx and scope.sy to get the current scope's size.
3) You can handle conditions using case statements to test attribute values.
case orientation=="East":
... // insert code to create church facing East
case orientation=="West":
... // insert code to create church facing West
else:
... // insert code to create church facing default direction