try this:
int temp=0;
function my_timer() {
temp++;
if (temp>=240) temp=0;
if (temp==10) DisplaySpeechBackground(BUGONE,"SCRATCH");
if (temp==50) DisplaySpeechBackground(BUGTWO,"SCRATCH");
if (temp==100) DisplaySpeechBackground(BUGTHREE,"SCRATCH");
}
it worked for me
int temp=0;
function my_timer() {
temp++;
if (temp>=240) temp=0;
if (temp==10) DisplaySpeechBackground(BUGONE,"SCRATCH");
if (temp==50) DisplaySpeechBackground(BUGTWO,"SCRATCH");
if (temp==100) DisplaySpeechBackground(BUGTHREE,"SCRATCH");
}
it worked for me