The array and a for loop was the sensible way to do this.
The problem was that you did not call Trigger() inside the for loop and when you did it once it only tests sensor number 5 which does not exist.
The array and a for loop was the sensible way to do this.
The problem was that you did not call Trigger() inside the for loop and when you did it once it only tests sensor number 5 which does not exist.