Sequencing a lot of events

I have some code that runs a sequence of events. It waits for a signal on A0 then runs the events at specific times based on millis(). This all works fine with my basic code for a few events. I have a variable that allows each event to only happen once then resets the variables and waits for then next trigger. In the final code I might need 300 events. Is there a better way of allowing each event to only happen once or will I end up with 300 check variables and 300 'if' statements?

 unsigned long timesincestart; //how long since the start
 unsigned long time; // general time variable
 unsigned long starttime; // when the start was triggered
 int starter =0;
 int cyclestarted =0;

 int event1=0;
 int event2=0;
 int event3=0;

 void setup() {
  pinMode(A0, INPUT);   
  Serial.begin(9600);
   }

void loop(){

if (cyclestarted == 0){ 
  starter = analogRead(A0);
  if (starter > 500 ){
  
    cyclestarted=1;
    starttime = millis(); //get time now
  }
}

if (cyclestarted == 1){
 time = millis();
  timesincestart = time - starttime;
  
    if (timesincestart > 30000 && event1==0){
    Serial.println("event1");
    event1=1; //don't run this again
  }  
  
    if (timesincestart > 35000 && event2==0){
    Serial.println("event2");
    event2=1; //don't run this again
  }  
  
    if (timesincestart > 38000 && event3==0){
    Serial.println("event3");
    event3=1; //don't run this again
  }
  
    if (timesincestart > 60000){
    Serial.println("finished");
    cyclestarted=0;
    event1=0;
    event2=0;
    event3=0;
  }
}
}

Is there a better way of allowing each event to only happen once or will I end up with 300 check variables and 300 'if' statements?

Arrays and for loops.

nickjb: In the final code I might need 300 events. Is there a better way of allowing each event to only happen once or will I end up with 300 check variables and 300 'if' statements?

Yes. Look up switch case. Your code will look something like this:

void loop(){
if (cyclestarted == 0){ 
  starter = analogRead(A0);
  if (starter > 500 ){
    cyclestarted=1;
    starttime = millis(); //get time now
  }
if (cyclestarted == 1){
   switch (event){ 
   case 0:
    if (millis()-starttime > 30000){
    Serial.println("event1");
    event++; //don't run this again
    starttime = millis(); //set new starttime
    }
    break;
   case 1:
    if (millis()-starttime > 5000){ 
   //Notice I'm using the time between events, not cumulative time.
   //Cumulative time will give you some huge numbers after 300 events,
   //which won't be easy to keep track of. Also, with cumalitve time, a
   //change to one timing will mean you'll have to change every timing 
   //after that one change.
      Serial.println("event2");
      event++; //don't run this again
      starttime = millis(); //set new starttime
      }
    break;
   case 2:
    if (millis()-starttime > 3000){
      Serial.println("event3");
      event++; //don't run this again
      starttime = millis(); //set new starttime
      }
    break;
    
.....etc
   case 299:
     if (millis()-starttime > 22000){
        Serial.println("event300");
        event++; //don't run this again
        starttime = millis(); //set new starttime
        }
     break;

   default: //for where the case isn't defined, eg event >=300.       event = 0;         cyclestarted = 0; // go back to start.       break;   }   }