Not sure why my array is not allowed to use a function (OOP)

Wow

Now, I moved the variables like int savedTime = millis();
already in the class because time shall be different for each triangle.

What to do

Now the class represents one triangle. ONE.

So display() should be brief: triangle(x, y, x+25, y+50, x-25, y+50);
(the for loop already is in draw() so NOT needed here )

Also you forgot to pass different values for x,y in setup() (because the false for-loop in display() took care of this). So in setup() calculate some values based on i.

Then use background(220); at start of draw() (NOT background(0); because black on black won’t work, you know… )

Now, go and fix your timer. 15 seconds is quite long though.

Got it working here.