# Pyramide with more then 1 step

Hi I’d like to ask You a question about pryramide programing. How to program pyramid with two and more steps like in the image?

So, you can make a custom event that makes a square N cubes wide, call that ‘square loop’. This custom event takes two parameters ( height, N ).

You could then call this event from a loop which starts at 10 and goes down in steps of 2. This would make the pyramid on the left.

To make the pyramid on the right, instead of just going down in steps of two, you also have a counter for X. The loop only steps down when the X counter has reached 0.

Then you can make the pyramid on the right. X = 2.

I did not get what Clockwork said but I made this:

Seems to do what was requested:

You’d need to work in the tip, though. It’s controlled by the Base Width and Step Height.

Not sure what I can add here. I wouldn’t calculate anything. You know when you’re going through either -x or x loop. Rotate the meshes during 1 of them only and that should be it.

Hi I’ve made it somehow but now struggling with rotation to center like here.

Wouldn’t it just be the case of rotating each instance when it’s added?

Yes it would but what formula will rotate it? I’m trying with dot product but with no luck.

Not sure you need dot here, a 90 degree rotation when constructing a side wall would work, no?

note to self: don’t call it a side wall, all of them are…

I’ve make blueprint more complex as three loops for x -x,y -y,z and keep it in 1 blueprint to proceduraly make it rectanglar or square. Now I need solution to calculate sides from center to each wall.

Ah, I thought it was supposed to be 3d…

It’s fully 3d. I thought it was supposed to be 2D judging by the pic. I guess I misread pyramid as triangle…

Close enough I guess.