ANIM=0 INC ANIM,5 IF ANIM>20 then SPCHR 0,1 IF ANIM<20 THEN SPCHR 0,0 IF ANIM>40 THEN ANIM=0 something like that i think..