trying to code looping alphabet

Im trying to code the alphabet that constantly loops at the top of my canvas. i can get it to print the alphabet only once. If i is the int i'm using in my for loop, and it goes from 0 to 100 in a loop, is there a way to reset it?

heres my code for my alphabet :

char c = 'Z';
char nextChar;

int i ;

float chatX = 100;

int speed = 3;

int spacing;

void setup(){
size(500,500);  

spacing = 40;  

}

void draw(){
  background(200);

  float nextChatX = chatX;

for( int i = 0; i < 26  ; i++){

  nextChar = char(c - i);

    textSize(40);
    text( nextChar , nextChatX - (spacing * i), 30);

}

if(chatX > 0)
  chatX = chatX + speed;

}
Sign In or Register to comment.