Creating a Fade in/Fade out image effect

I'm trying to create an image effect where it fades in , and after a few seconds it fades out. 


Like when you are about to start a chapter of a game, a graphic appears to tell you it's begun, and then fades out.


The idea that when the player shows up on the map, it fades in as an overlay, and then faces out.


Right now, The code I have for the image looks like this:


◆Show Picture:#1, Chapter1Overlay, Upper Left (0,0), (100%,100%), 200, Normal
◆Wait:180 frames
◆Erase Picture:#1


It just shows the picture and disappears after 3 seconds. I've tried other things, but it just doesn't work.


I was thinking of a loop, but there is no way to 


Suggestions ?
You will need to set the opacity of the image in the Show Picture command to zero then use the Move Picture command to fade the picture in. Set the opacity within the Move Picture command and the duration to whatever you wish. Then you can fade the picture out by reversing the process.

Code:
◆Show Picture:#1, Chapter1Overlay, Upper Left (0,0), (100%,100%), 0, Normal
◆Move Picture:#1, Upper Left (0,0), (100%,100%), 200, Normal, 60 frames (Wait)
◆Wait:180 frames
◆Move Picture:#1, Upper Left (0,0), (100%,100%), 0, Normal, 60 frames (Wait)
◆Erase Picture:#1
I would use multiple show image events just with the opacity changed a bit until the picture disappears completely.  Wait commands can help if you want it to be more gradual.
is the image already showing when you do the "Show Picture" ? When you fade out, you have to use the Move Picture command and do it from there. Show Picture assumes you want something new there instead of manipulating an old picture.


So if you want the fade in and then fade out, use the Show Picture command to get it where you want at zero opacity. Then use Move Picture command to have it change opacity, then wait a few frames or whatnot, then use the Move Picture command to fade out. Then erase when it's all done with that.
You will need to set the opacity of the image in the Show Picture command to zero then use the Move Picture command to fade the picture in. Set the opacity within the Move Picture command and the duration to whatever you wish. Then you can fade the picture out by reversing the process.



◆Show Picture:#1, Chapter1Overlay, Upper Left (0,0), (100%,100%), 0, Normal
◆Move Picture:#1, Upper Left (0,0), (100%,100%), 200, Normal, 60 frames (Wait)
◆Wait:180 frames
◆Move Picture:#1, Upper Left (0,0), (100%,100%), 0, Normal, 60 frames (Wait)
◆Erase Picture:#1






 

That totally worked!


Thank you everyone. 🙂

Original thread: https://forums.rpgmakerweb.com/threads/creating-a-fade-in-fade-out-image-effect.68425/