First off, hi, I'm new. Nice to meet you all.
Second off, Vlue, this script is awesome. The only thing I'm finding is that the clock always hides when I open the menu. No matter what, it will turn invisible if I go into the menu screen. Is there possibly a way to change this?
Thank you for the quick reply!
Yup, updated the pastebin to avoid that problem, try it out.
👍 Yeah! Seems to be working fine now! 👍
Thank you!
So I'm having some trouble with the variables. I'm trying to add an eat/sleep cycle.
I tried this as a common event
$game_variables[2] = GameTime.hour? I put this in a loop on parallel process but it won't change the variable.
Any ideas?
Did you turn the switch for the common event on? (I make that mistake a lot)
Try using Control Variable and just putting GameTime.hour? in the script box.
Gave it a shot still freezes up when it loads in
Is your event turning on the switch an autorun with no shut off?
Actually it was so I fixed that and it still didn't work but then I removed the loop from the common event and now it works. Thanks for the help! and your script works great thanks!
Just have one more quick question, when you set the script to add the time to a variable does it reset at the end of a day or does it just keep track of the total time?
The TIME_VARIABLE option in the script is just always equal to the current minute in the day, so it resets at the end of day~
Cool, that will work well with what I want to do. Thanks for all the help!
Is there any way I can set a specified start time for the clock when the game is first ran? Also, is there any way I can disable it and enable it?
Change line 90 from 0 to whatever minute you want it to start as.
Script call, GameTime.clock(true/false) hides and shows the clock
and GameTime.pause_time(true/false) stops and starts time.
I love the script.
But I've run into a problem. When I playtest, and start a new game, it runs fine, but once I save and exit out and go to continue the saved game it pops up with
"Script 'Basic_DayNight' line 120: NoMethodError occured
undefined method '/' for nil:NilClass"
I don't know what to do...
Here is the line of the script:
119 def self.hour?
120 return $game_time / 60
121 end