Blackout screen making

Started by InCreator, Mon 27/06/2005 13:52:33

Previous topic - Next topic

InCreator

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!  :)

Anarcho

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...


Tom S. Fox

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:

Code: ags

palette[15].r=63;
palette[15].g=63;
palette[15].b=63;
updatepalette();

Jay

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

Tom S. Fox

Yes, it works.
I'm using it in my own game, too.

Ashen

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.
I know what you're thinking ... Don't think that.

SMF spam blocked by CleanTalk