Create a new variable with the value same as Day. Check if this new variable's value is less than day. When day increases by 1, the condition will return true. So that will tell you that a new day has passed. Then you can update the new variables value to be equal to day's value again. This cycle continues.
Bless you, this worked like a charm, I'm so stupid for not seeing it before. I knew the answer to my problem was related to a second variable that checked the time but I couldn't grasp how to check both together.
If a time/clock system is present it means you probably use a variable to manage hours passing, assuming this lets call variable "time" time starts at 0 and increases by 1 for each hour, parallel process, +1 to var every x time,simple. when the time var reaches 24, its time to switch the day, apply your "sleep reset" procedure then start again.
hour var= 0+1 every x frames, when hour var= 24 -> day has passed->reset everything.
Yes in the end I followed
Hyouryuu-Na's advice and now everything works fine with just a simple conditional parallel event that checks whether Days>DaysCheck and if so then Set DaysCheck=Days
What you could do is lock out daily events with a self-switch.
Then, in the sleep event, make a script call with this line for each self-switch you're turning off this way:
$gameSelfSwitches.setValue([mapID, eventID, 'X'], false);
What it does is that it goes into the map whose ID was given, opens the event whose ID was given as well, and turns off the self-switch given by the letter (from A to D) written instead of X. Don't remove the little 's, they're important.
Example:
In map number 10, event number 5 is a newspaper. When you pick it up, self-switch A is turned on.
In the sleep event, I'll write $gameSelfSwitches.setValue([10, 5, 'A'], false); so there's another newspaper at the same spot when the player wakes up.
Note: you can put this line multiple times in the same script call command.
Yes, I already block the events with a self switch so they only activate once a day, I remember that took me a long time to figure out when I first started. Sadly, I can't make scripts work and I don't know how to use them no matter what I try they always do nothing so I figured I'd make what I can with the preset commands.
I think I understand the script that you wrote and I'm gonna try it
🙂 My workaround was that when I go to sleep, I set a common event called "SleepReset" and that reactivates every switch I want. But your idea of a script turning off the SELFswitches is brilliant that's exactly what I want but it will take me some time to implement it.
Could you please teach me how do you write the script, I mean in which command or where? I've seen people writing them in "notes", in the "script" command, in the plug in lists, and idk where does it go actually? Many thanks for your help