Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Tom on Sat 07/06/2003 20:15:00

Title: Background Speech "Too many Overlays"
Post by: Tom on Sat 07/06/2003 20:15:00
Well I'm using Background speech in my game. But rather than one line, I'm doing a song instead. I've put it in Repeatadly Execute because I want it going all the time you're in the room.
Here's the script I'm using (I've took out the words just in case they offend anyone  :) )

DisplaySpeechBackground(GIR, "line one" );
DisplaySpeechBackground(GIR, "line two" );
DisplaySpeechBackground(GIR, "line three" );
DisplaySpeechBackground(GIR, "line four" );
Wait (30);

Then it should repeat.

But when I go to test the game, It crashes out saying "Too many overlays"

Any ideas would be appreciated.

(edited due to shockingly poor grammer)
Title: Re:Background Speech "Too many Overlays"
Post by: miguel on Sat 07/06/2003 23:27:59
not sure but try to add Wait comands after each line, it should work
Title: Re:Background Speech "Too many Overlays"
Post by: Squinky on Sun 08/06/2003 03:52:21
Yep, That'll have em all going at once, and ags dosen't seem to like that, maybe use a while instead of wait though, since the whole point of background speech is to not "block" other functions, if you use wait, might as well use a normal displayspeech....
Title: Re:Background Speech "Too many Overlays"
Post by: miguel on Sun 08/06/2003 10:27:03
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