Howdy everyone. I'm sure the answer to this is staring me in the face, but I can't quite figure it out. Currently I have it all running in one common event, though it doesn't seem to be working. I wanted to make it to where I can have time sensitive events. Thank you so so much for all your help!
Day / Night Cycle
RPG Maker VXAce SupportWithout delving deep into your issue, the first thing I noticed is that your calculation of hours doesn't make sense here. It's like every 10 minutes, but also at the 11 and 12, etc. mark it will keep increasing the hours. Why's that necessary in your game? ?_?
Please elaborate. How is it not working?
Edit:
Also, when do the hours get reset to 0?
Hey, @HauntedCicadaSongs. I copied your code line for line and it works fine for me. If I had to make a suggestion, I would put Seconds >= 0 like you did for minutes, just for a little extra stability. And yeah, like the others said, you're missing the cycle part of your day/night cycle. If your day is 24 hours, you could set hours to 0 when hours is 24 to start the next day.
Weird suggestion indeed. Even if it'd seem to be working normally then, the truth is that it's a bad calculation of the seconds that have elapsed so far.
Once it hits the 10 second mark, it should immediately go back to 0 and add 1 minute to the minute variable.
Sorry! I only made it 10 so itd be quicker to test it and see if works. I'm not sure abt the other stuff, so sorry @v@
oh ofc i cant believe i missed that! ty!!!
I did make it up to 24, it just didnt fit in the image, my bad!!! (if i understand you right, so sorry if not) Hm, I'll have to play around with it more since it worked for you!!!
The tinting isnt working specifically!
After the hour variable hits 24!
That's a fair point. However, imagine some freak scenario where for some reason the Second variable somehow goes over 10 without triggering the Seconds == 10 conditional branch. Then the Second variable would count up forever without being reset to 0 and the day/night cycle would be ruined.
Putting >= instead of just == would both immediately trigger the conditional branch, and not interrupt the cycle in case something goes wrong.
yeah that seems to be a reoccuring issue for me for some reason, things get skipped over sometimes unless I adjust it.
EDIT: AH, so sorry everyone!! I figured out what was wrong.
I.............forgot to turn on a switch
Some how, I had a feeling that was the case. Glad you solved it.
Mind the double (and triple! Yikes) posting.
Mind the double (and triple! Yikes) posting.
Thank you so much!!
Oh wait, I misunderstood, I apologize, and wont post here any longer
I've merged your double posts.
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.
Original thread: https://forums.rpgmakerweb.com/threads/day-night-cycle.165570/