Changing tint depending on time of day?

I'm trying to make a game where the time of day changes depending on what you do.
So if it's early morning and you go to bed, it will become afternoon and so on.
That part i've managed to figure out, and i AM able to change the tint depending on the time of day...but...

The game starts with it being early morning, inside a house.
Inside the tint is normal, and when you step outside, the tint changes to sunset.
But then when i use the bed and it turns afternoon, i can't make it the sunset tint not show up when i leave the house.

I'm still a newbie who's just playing around for now, so sorry if i this might have an obvious solution that i missed.
obvious solution indeed.
Parallel process common event that is full of conditional branches.
If variable Hour of the day equals x, change the tint accordingly.
So for 20 it's dark
on 5 it's lighter
on 8 it's normal
on 18 it's red signalizing sunset
or do it just as you wish
and in the end there should be a wait command to make it a bit lighter on the computer 🙂

Forgot to say: Parallel process common event needs a switch to work on. Since you say it needs to differ inside and outside, then the switch will be called Outside. Whenever you go inside a house, it turns off and whenever you go outside a house, it turns on 🙂
Thanks for the quick answer.
It's seems like i have to study up on variables a LOT more, since i'm still pretty unsure how to use them and how to do what you have described.
I'll watch some more tutorials and try what you suggested. 🙂
Okay...I'm starting get a hang of using variables, but still can't seem to make this work :/
Could you maybe post some screenshots or a video on how you would o it if it's not too much trouble? XS
I'll get to it.
I'll get to it.
I should probably mention that the way i want the days in the game to progress, is when you do certain stuff like harvesting something or simply use the bed, the time of day will change.
I've been making a bed the trigger, and i've been able to make a little sign pop up telling what time of day it is, and change it from like morning till afternoon.
I've been doing the exact same thing with the tinting, but for some reason it won't change when i trigger the bed.
I'll explain in a similar case. You're outside - the screen tints according to the daytime. You'll return - the screen returns to normal. Because both use the same principle.

So, how to start... I created a fresh new project and used zero plugins, so I hardcoded the daytime through use of a parallel common event. So I created the parallel process common event.
Spoiler: Nothing fancy.
Screenshot_33.png
Just an event that every second increases passed minutes to one, if they reach 60, then hours get increased by 1 and if the hours reach 24, they get decreased to zero (I could increase days by one if I wanted, but whatever 😀).
So now depending on what time it is, the screen tint changes. I separated it to four cycles, 6 am-10 am - dawn, 10-17 - day, 17-20 - sunset, 20-6 - night. But it doesn't really matter.
So I added a huge conditional branch. This branch also considers if I'm outside, because I said that if I was inside, nothing would happen.
Spoiler: Day cycle tinting
Screenshot_34.png
In the end of this event there is a wait command for 60 frames (otherwise the hours would be passing instantly), but it's not visible on the screen.
I guess you were able to do this without no problem, since you only refer to having problems with the bed. So I'll now go to the more interesting passage.
If I did nothing now and just tested the game... As long as I stay outside and turn the switches 01 (mandatory switch for the common event that takes care of my daycycle) and 02 (switch that means I'm outside) on, the game will work fine. Every hour I will get a report about passed hour and every now and then the tint would change. Once I enter the house though, my teleport event will turn off the Outside switch and reset tinting.
Spoiler: Just like you can see here.
Screenshot_38.png
However, if I want to go outside, it's not just enough to turn the switch Outside on... Why?
My parallel common event is set like this.
1. every 60 minutes increase hours by one
2. if the time REACHES EXACTLY 6, 10, 17 or 20 hours, change the screen... But then it doesn't care if it already is 6, 10, 17 or 20... And also there is so much time between these intervals that is NOT covered by this event! So we will need to cover this time... How?
Through another event!
You have to hard code the tinting. And that's where you create another common event, this time it will be a common event with no trigger, because we want to call it through an event.
And this common event has only one function. When I go outside, it should determine what time it is and according to it tint the screen.
So if it's between 8 pm and 6 am, it will tint it dark, if it's after 5 pm, it will tint it as a sunset, if it is between 10 and 17, it will tint it normally... And if it's between 6 and 10, it will be dawn.
Spoiler: How the common event looks:
Screenshot_41.png
There's one mistake btw. These conditional branches shouldn't be >, but >=. (in other words it should be Greater than or equal to, not just Greater than. But the principle is the same.

So now that we have the remaining time covered, we can finally focus on creating the event that will get us outside.
It will turn on the switch Outside to make sure the daytime gets updated visually again... And through calling the common event 0002 it will force an IMMEDIATE UPDATE of the screen tint based on what time it is.

Spoiler: Time to go outside
Screenshot_44.png

I think this is it. We've got everything covered and a fully working day/night cycle. However, the key was not only that cycle, but also the one-time update.
I'm very sorry but we've seen to have misunderstood each other.
I did not want real time in my game, i wanted certain objects to trigger an instant change of day cycle.
So if i wanna harvest a field it takes some time, so it instanly goes from afternoon to evening.

But i seem to have made it work with just switches, so the flaw i made must have been with the variebles. (i'm mildly number blind so they still quite confuse me)

But still thank you so much for your willingness to explain this confused newbie in such detail!
And i will definetly save your explanation if i in the future wanna use this kinda day and night cycle. 😀

Original thread: https://forums.rpgmakerweb.com/threads/changing-tint-depending-on-time-of-day.80093/