Attached are the two scripts I wrote. I didn't really comment anything as it should be easy to follow and there isn't too much there. They could be optimized more if needed.
The numbers in the timer script deal with how long you want the day to go. It's just based on per-step.
The other script deals with variables that are Red Green Blue values. If you want to change the color, you either need to know the 255 spectrum or open up your favorite image editor and find a color you want to find the RGB values.
Don't forget these globals to initiate before the object:
global.In_overworld = true;
global.Time_of_day = "day";
global.Time = 1200;
In order to use the scripts, I have a single persistent object created in the first room of my projects(I have used this day/night system in 4 on going Zelda projects of mine).
objDayNightControllerCREATE EVENT
color = 0;
colorR = 0;
colorB = 0;
colorG = 0;
image_alpha = 0;
STEP EVENT
if (global.paused == false)
{
x = view_xview;y = view_yview;
scrDayNightTimer();
if (instance_exists(objHUDcontroller))
{
depth = objHUDcontroller.depth + 1;//objHUDcontroller is always at the closest depth, so we want the overlay to be drawn under it
}
}
DRAW EVENT
scrDrawDayNight();
https://drive.google.com/file/d/0B49_4X0jDFp8QnJqSXY1VDRpMVU/view?usp=sharingIf you want to see it in action in a project I have been working on, you can mess with my Zelda II project. It'll take some time, but just move around and such and after some time, you'll see the transition.
As I said, coming out of morning needs some work.