Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: InCreator on Mon 27/06/2005 13:52:33

Title: Blackout screen making
Post by: InCreator on Mon 27/06/2005 13:52:33
Well, sounds simple, but I can't figure it out...  :(

How to simply make a moment, where screen fades out, a text message appears, like "10 minutes later..." and screen fades in again? Fading room out also fades whole palette so displaying speech won't work here.

Should I make a new room for this and change simply the room?
This wouldn't be too simple, because when returning, many room variables will be reset...?
Em - then again... I could just check what room game was before in "before fadein" event and reset variables only if --

Well, just tell me if there's any simpler way!  :)
Title: Re: Blackout screen making
Post by: Anarcho on Mon 27/06/2005 15:39:15
There is a fadeout command in the script index, also a fadein command.  I think basically you would call the fadeout command, run a DisplaySpeech or DisplayMessage command, then a fade in.  Correct me if I'm wrong, but isn't that all it takes?  You might have to use a Wait command in the middle of that though...
Title: Re: Blackout screen making
Post by: Tom S. Fox on Mon 27/06/2005 15:42:44
The problem is, after using the fadeout command, the text color goes black, too.
Is your game using the palette (256-color) mode?
If yes, you can type something like this, to restore the text color:


palette[15].r=63;
palette[15].g=63;
palette[15].b=63;
updatepalette();
Title: Re: Blackout screen making
Post by: Jay on Mon 27/06/2005 15:49:02
If you only need to fade for one particular room, you could fade to black like normal, then change the background frame (SetBackgroundFrame) to an all-black frame, then fade in instantly (the player won't see this fade-in), display the text, then fade out (the player won't see this fade-out), change the background frame again and fade back in.

You could also make a background frame that already says "Ten minutes later".


edit: Oh, Thomas's code would probably work too
Title: Re: Blackout screen making
Post by: Tom S. Fox on Mon 27/06/2005 16:00:32
Yes, it works.
I'm using it in my own game, too.
Title: Re: Blackout screen making
Post by: Ashen on Mon 27/06/2005 16:00:56
What about using a screen-sized black object, and fading that in and to cover the screen. But since Thomas' code works, that's probably the more sensible way.