Changing a knight rider sketch

Good evening
I need some help I have a knight rider code that I need to go in a continuous circle loop not going in reverse, using 8 leds, as I want to use this for a star trek Uss Franklin project for the Bussard collectors, The code is below.
I did try using a sketch that worked brilliantly using delay command, but that stopped my nave strobe and impulse engine fade effects.
Any help would be appreciated.
The Knight rider sketch was not written by me.

Thank you in Advance

/*
Knight Rider for Arduino

This example code is in the public domain.
*/

// define output pins
int outPins[] = {2, 3, 4, 5, 6, 7, 8, 9,};

// timer
long previousMillis = 0;
static long TIMER = 50;
//
int knightLight = 0;
int knightCounter = 1;

void setup()
{
for(int p = 0; p < 8; p++) {
 pinMode(outPins[p], OUTPUT);
}
}

void loop() {
unsigned long currentMillis = millis();
if(currentMillis - previousMillis > TIMER) {
 previousMillis = currentMillis;
 // reset last knight light
 digitalWrite(outPins[knightLight], LOW);
 // calc new knight light
 knightLight = knightLight + knightCounter;
 if (knightLight > 7) {
   knightLight = 7;
   knightCounter = -1;
 }
  if (knightLight < 0) {
   knightLight = 0;
   knightCounter = 1;
 }

 // set new knight light
 digitalWrite(outPins[knightLight], HIGH);
}
}
 knightLight += 1;
    if (knightLight > 7) {
      knightLight = 0;
    }
    }

Trekkin!

Are you saying you are using a ring of eight LEDs?

Please go and read the forum instructions so that you can go back and modify your original post (not re-post it) - using the “More → Modify” option below the right hand corner of your post - to mark up your code as such using the “</>” icon in the posting window. Just highlight each section of code and click the icon.

Substitute:

void loop() {
  unsigned long currentMillis = millis();
  if(currentMillis - previousMillis > TIMER) {
    previousMillis = currentMillis;
    // reset last knight light
    digitalWrite(outPins[knightLight], LOW);
    // calc new knight light
    knightLight++;
    if (knightLight > 7) {
      knightLight = 0;
    }
  
    // set new knight light
    digitalWrite(outPins[knightLight], HIGH);
  }
}

Eventually they will use 16, 8 for each bussards collector spinning in opposite directions. For which I will wire up in the opposite direction.
Just used your code and it works stupendously, thank you very much, been fighting that for four days, as I'm also trying to learn arduino at the same time.

Paul__B:
Trekkin!

Ah, that was a great song! As long as you only hear it once every decade. I remember when it was a hit, it got played endlessly and very quickly became annoying. Shame that "The Firm" don't get a credit in that video. Anyone remember their other hit "Arthur Daley"? In the style of Chas & Dave.