blink without delay multiple if's problem

Hi there

I have hit a problem that I can't figure out i've tried lots of things, using the example of blinkwithoutdelay I was looking to make a chaser led but it seems that it gets stuck on the first if function and then repeats it never moving to the next if, Using the delay function it works no problem.
this is a cut down version that still displays the same problem. Its probably something simple, I bow to you superior knowledge!

int led0 = 13; // defines led 0 output pin
int led1 = 12; // defines led 1 output pin
int led2 = 11; // defines led 3 output pin
int led3 = 10; // defines led 4 output pin

int ledLow = 0;
int ledHigh = 255;

// chaser section
long interval = 1000;         //interval timer for chaser section
long previousMillis = 0;  // time differance from last read

void setup() {                
  // initialize the digital pin as an output.
  pinMode(led0, OUTPUT);          //sets led output
  pinMode(led1, OUTPUT);          //sets led output
  pinMode(led2, OUTPUT);          //sets led output
  pinMode(led3, OUTPUT);          //sets led output
  Serial.begin(9600) ;
}

void loop()
{
  
  unsigned long currentMillis = millis();  // sets the run time counter
  
  //************************************************************************************
  //chaser section
    
    if(currentMillis - previousMillis > interval) {  //interval timer
      previousMillis = currentMillis;  //resets interval timer
      digitalWrite(led0, ledHigh);
      //previousMillisChaser = currentMillis;  //resets interval timer
      Serial.println("high");
      }
      
    if(currentMillis - previousMillis > interval) {  //interval timer
      previousMillis = currentMillis;  //resets interval timer
      digitalWrite(led0, ledLow);
      //previousMillisChaser = currentMillis;  //resets interval timer
      Serial.println("low");
      }
  }
/*      
    if(currentMillis - previousMillisChaser > intervalChaser){  //interval timer
      previousMillisChaser = currentMillis;  //resets interval timer
      digitalWrite(led1, ledHigh);
      //previousMillisChaser = currentMillis;  //resets interval timer
      //Serial.println("high");
      }
      
    if(currentMillis - previousMillisChaser > intervalChaser){  //interval timer
      previousMillisChaser = currentMillis;  //resets interval timer
      digitalWrite(led1, ledLow);
      //previousMillisChaser = currentMillis;  //resets interval timer
      //Serial.println("low");
      } 
      
    if(currentMillis - previousMillisChaser > intervalChaser){  //interval timer
      previousMillisChaser = currentMillis;  //resets interval timer
      digitalWrite(led2, ledHigh);
      //previousMillisChaser = currentMillis;  //resets interval timer
      //Serial.println("high");
      }
      
    if(currentMillis - previousMillisChaser > intervalChaser){  //interval timer
      previousMillisChaser = currentMillis;  //resets interval timer
      digitalWrite(led2, ledLow);
      //previousMillisChaser = currentMillis;  //resets interval timer
      //Serial.println("low");
      }
      
    if(currentMillis - previousMillisChaser > intervalChaser){  //interval timer
      previousMillisChaser = currentMillis;  //resets interval timer
      digitalWrite(led3, ledHigh);
      //previousMillisChaser = currentMillis;  //resets interval timer
      //Serial.println("high");
      }
      
    if(currentMillis - previousMillisChaser > intervalChaser){  //interval timer
      previousMillisChaser = currentMillis;  //resets interval timer
      digitalWrite(led3, ledLow);
      //previousMillisChaser = currentMillis;  //resets interval timer
      //Serial.println("low");
      }
  */
   //Serial.println("chaser");
   //Serial.println();

Your problem is that both IF statements are using the same previousMillis.

When the elapsed time reaches 'interval' the first IF triggers and resets the elapsed time. The second IF will never see the elapsed time reach 'interval' because if it reaches 'interval' the previous IF has already reset it.

Ok see your point, that makes sense I think I need to change the way I approach it I'll give it a go when I get some quite time.
Thank you for your speedy reply.
I bow to you superior knowledge!

What one would typically do is have a list of the patterns one wants to display, a list of intervals each pattern is displayed (if they are not all the same) and an index of how far in the list you are. When the elapsed time hits the current interval:

Increase the index.
If the index exceeds the number of patterns, reset it to 0.
Display the pattern at the new index.
Set previousMillis to currentMillis.
Set 'interval' to the interval for the new index.

Hi John

I finnished the program now and an very pleased with myself, first program yey!
I got over the timer problem like this

 //************************************************************************************
  //chaser section
    
 if(buttonCounter == 1 || buttonCounter == 6) {
   
   Serial.print("chaser section");
   Serial.println();
      
    if(chaserStep == 0){
     if(millis() - lastTime > intervalChaserOn){
       lastTime = millis();
       digitalWrite(led0, HIGH);
       //Serial.println("high");
       chaserStep = 1;
     }
   }
   
   if(chaserStep == 1){
     if(millis() - lastTime > intervalChaserOff){
       lastTime = millis();
       digitalWrite(led0, LOW);
       //Serial.println("low");
       chaserStep = 2;
     }
   }
   
   if(chaserStep == 2){
     if(millis() - lastTime > intervalChaserOn){
       lastTime = millis();
       digitalWrite(led1, HIGH);
       //Serial.println("high");
       chaserStep = 3;
     }
   }   
   
   if(chaserStep == 3){
     if(millis() - lastTime > intervalChaserOff){
       lastTime = millis();
       digitalWrite(led1, LOW);
       //Serial.println("low");
       chaserStep = 4;
     }
   }
   
   if(chaserStep == 4){
     if(millis() - lastTime > intervalChaserOn){
       lastTime = millis();
       digitalWrite(led2, HIGH);
       //Serial.println("high");
       chaserStep = 5;
     }
   }
   
   if(chaserStep == 5){
     if(millis() - lastTime > intervalChaserOff){
       lastTime = millis();
       digitalWrite(led2, LOW);
       //Serial.println("low");
       chaserStep = 6;
     }
   }
   
  if(chaserStep == 6){
     if(millis() - lastTime > intervalChaserOn){
       lastTime = millis();
       digitalWrite(led3, HIGH);
       //Serial.println("high");
       chaserStep = 7;
     }
   } 
   
   if(chaserStep == 7){
     if(millis() - lastTime > intervalChaserOff){
       lastTime = millis();
       digitalWrite(led3, LOW);
       //Serial.println("low");
       chaserStep = 0;
     }
   }
 }

I simplified some of my code and added a step counter to fix the problem!