Need advice on millis firing out of order

Can someone tell me how to configure this sketch so that the code blocks execute in order rather than by size of intervals. Thank you

//states
bool pin8_state = LOW;
bool pin9_state = LOW;
bool pin10_state = LOW;
bool pin11_state = LOW;

//pins
byte pin8 = 8;
byte pin9 = 9;
byte pin10 = 10;
byte pin11 = 11;

unsigned long pre = 0;

void setup() {
  pinMode(pin8, OUTPUT);
  pinMode(pin9, OUTPUT);
  pinMode(pin10, OUTPUT);
  pinMode(pin11, OUTPUT);
  Serial.begin(9600);
}

void loop() {
  unsigned long cur = millis();

  if (cur - pre >= 500 && pin8_state == LOW) {
    pin8_state = HIGH;
    pre = cur;
    digitalWrite(pin8, pin8_state);
  }

  if (cur - pre >= 6000 && pin9_state == LOW) {//wish for this long delay here, not later
    pin9_state = HIGH;
    pre = cur;
    digitalWrite(pin9, pin9_state);
  }

  if (cur - pre >= 500 && pin10_state == LOW) {
    pin10_state = HIGH;
    pre = cur;
    digitalWrite(pin10, pin10_state);
  }

  if (cur - pre >= 500 && pin11_state == LOW) {
    pin11_state = HIGH;
    pre = cur;
    digitalWrite(pin11, pin11_state);
  }

if (cur - pre >= 500 && pin11_state == HIGH) {
    pin11_state = LOW;
    pre = cur;
    digitalWrite(pin11, pin11_state);
  }

}//end loop

Moderator edit: code tags corrected

BillByrd:
Can someone tell me how to configure this sketch so that the code blocks execute in order rather than by size of intervals.

Just get rid of the intervals then.

An honest attempt but, code tags are properly enclosed in square brackets instead of <>.

How do cur and pre get their values?

All the pin states controlled by if (cur - pre >= 500 && pinxx_state == LOW) { could be placed inside one if().

You have only one timing variable called pre. This seems to be used for several independent time intervals. That won't work.

I think the fix is to make them not independent. One way to do this is to test if pin8 is HIGH when you are looking at the pin9 interval.

Another way is to re-write your intervals as a list. Step 1 waits for 500ms, step 2 waits for 6000ms... Then each of those steps will have a specified pattern of LEDs to turn on. The output function just looks at what step you are in to switch outputs and it doesn't need all the timing information mixed in to the one function.

Yep, you need a separate "pre" for each pin state.

unsigned long pre8, pre9, pre10, pre11;
  if (cur - pre8 >= 500 && pin8_state == LOW) {
    pin8_state = HIGH;
    pre8 = cur;
    digitalWrite(pin8, pin8_state);
  }

Etc.

Thanks guys (especially Montmorency). I took your advice to heart and will use it. But, before I was able to read through them, I thought of another way. It's probably totally unorthodox, but will make it possible for me to complete my current project until I can implement your solutions. And for the benefit of anyone who might find it useful, I post the sketch below:

//states
bool pin8_state = LOW;
bool pin9_state = LOW;
bool pin10_state = LOW;
bool pin11_state = LOW;

//pins
byte pin8 = 8;
byte pin9 = 9;
byte pin10 = 10;
byte pin11 = 11;

unsigned long pre = 0;

void setup() {
  pinMode(pin8, OUTPUT);
  pinMode(pin9, OUTPUT);
  pinMode(pin10, OUTPUT);
  pinMode(pin11, OUTPUT);
  Serial.begin(9600);
}

void loop() {
  unsigned long cur = millis();
if(pin8_state == LOW && cur - pre >= 1500){//fire 1st
    pin8_state = HIGH;
    pre = cur;
    digitalWrite(pin8, pin8_state);
}
if(pin9_state == LOW && cur - pre >= 15000){//fire 2nd
      pin9_state = HIGH;
      pre = cur;
      digitalWrite(pin9, pin9_state);
}
  if (pin10_state == LOW && cur - pre >= 1500 && pin9_state == HIGH) {//fire 3rd
    pin10_state = HIGH;
    pre = cur;
    digitalWrite(pin10, pin10_state);
  }
  if (pin11_state == LOW && cur - pre >= 500 && pin9_state == HIGH && pin10_state == HIGH) {//fire 4th
    pin11_state = HIGH;
    pre = cur;
    digitalWrite(pin11, pin11_state);
  }  
}//end loop