too many overlays problem?

Started by piraatlife4me, Fri 05/03/2004 20:56:50

Previous topic - Next topic

piraatlife4me

Hey friends!
I am having a weird problem in AGS. When I am in a certain room in my game the game just shuts down and displays a message saying too many overlays created. The thing thing that is odd is that there is only one overlay set in the room. Does anyone know why this may affect other rooms in the game? Is there a way to clear all overlays each time the player leaves the screen? Another thing I noticed is when I create a text overlay and give it a id and put it in the  repeatedly execute script under a istimerexpired command it won't let me remove the overlay when I try to leave the screen. How do I specify an id for a text overlay set under a timer?

Daniel
Winebarger

Ishmael

#1
AFAIK all overlays are removed when a new room is loaded. All Lucasarts speech atleast are overlays, so you could do int spcov = DisplaySpeech(EGO,"Wheep"); and spcov would then contain the overlay id of the speech line... but basically, you don't define the id's theirselfs.. you get them. like:

int overlay;
overlay = SetTextOverlay(......);

and when you want to remove the overlay;

RemoveOverlay(overlay);
I used to make games but then I took an IRC in the knee.

<Calin> Ishmael looks awesome all the time
\( Ö)/ ¬(Ö ) | Ja minähän en keskellä kirkasta päivää lähden minnekään juoksentelemaan ilman housuja.

piraatlife4me

Hey TK,
Yeah that is a good idea. I tried something similar and it fixed the problem I was having. I just added in some room variables in before the script and turned them off when the player leaves the screen and turned them back on in the before fade in script. It works now. Thanks for the help, I appreciate it :)
Daniel
Winebarger

Pumaman

Yeah, the usual cause of this error is if you've accidentally put some sort of DisplaySpeechBackground command into repeatedly_execute and it's displaying a new background speech line every game loop.

Oh, also, piraatlife4me - would you mind downscaling your signature image as per the guidelines at the top of the forum? Thanks.  :)

piraatlife4me

Oh! I see what you mean.
Thanks for the tip. I was just thrown off a little bit by it all. I really appreciate it.


SMF spam blocked by CleanTalk