Time Variable Randomly Stops

mylafter

Veteran
Veteran
Joined
Dec 30, 2012
Messages
179
Reaction score
95
First Language
English
Primarily Uses
N/A
So before you read ahead it's important you should read my previous thread that connects to this one.
https://forums.rpgmakerweb.com/index.php?threads/time-variable-question.108454/

We made changes to the Time Variable script so that the game can change the 'Frames Till Update' for each minute that passes by. But after doing so, I noticed there's this glitch where the time would stop operating. The glitch occurs after the game resets the time back to 7AM. (There's an event in my game where the player would go to sleep to reset the day over at 7AM.) Problem is, sometimes the glitch would happen and sometimes it won't. Leading me to suspect that maybe it has something to do with the new changes we added to the script because this has never happened before. I tried many ways to see what specifically causes this to happen because again, it seems to happen randomly.

Hopefully that made sense, if not, let me know if you have any further questions.
 

Sixth

Veteran
Veteran
Joined
Jul 4, 2014
Messages
2,136
Reaction score
805
First Language
Hungarian
Primarily Uses
RMVXA
Try to set the $sel_time_frame variable to 0 in that sleep event of yours right after the time reset.
The script call should look like this:
Code:
$sel_time_frame = 0
Depending on the time when the reset happens, that variable may already be higher than your variable's value for the FRAMES_TIL_UPDATE thing you changed in the script, which means no further progression for the time because it only checks if these two variables are equal.
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,642
Reaction score
2,972
First Language
Tagalog
Primarily Uses
Depending on the time when the reset happens, that variable may already be higher than your variable's value for the FRAMES_TIL_UPDATE thing you changed in the script, which means no further progression for the time because it only checks if these two variables are equal.
So, editing the system to check "greater than or equal to" rather than just "equal to" is also possible right?
 

mylafter

Veteran
Veteran
Joined
Dec 30, 2012
Messages
179
Reaction score
95
First Language
English
Primarily Uses
N/A
Try to set the $sel_time_frame variable to 0 in that sleep event of yours right after the time reset.
The script call should look like this:
Code:
$sel_time_frame = 0
Depending on the time when the reset happens, that variable may already be higher than your variable's value for the FRAMES_TIL_UPDATE thing you changed in the script, which means no further progression for the time because it only checks if these two variables are equal.
Thanks! I think that worked? I messed around with me game for an hour to see if the glitch would appear again but it didn't. It's hard to trigger it since it's random. I'll let you guys know if anything changes though. Thank you again!
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Been parallax mapping nigh all night. :D
2nd character based on the same random inputs
the coffee shop i go to for open mic every friday only has 2 more open mics left and then they're done :'( i'm gonna die!
Everytime someone says Intel "kabylake" I hear either baby lake or ladycake.
Either I just had one of those dreams where you think you're awake, or I have time traveled. I woke up at 6:58am this morning, heard my father leaving for work, laid back down, now its 1:16am.

Forum statistics

Threads
93,383
Messages
911,872
Members
122,885
Latest member
Hayato7729
Top