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