Time Variable Randomly Stops

Discussion in 'RGSSx Script Support' started by mylafter, Jun 6, 2019.

  1. mylafter

    mylafter Veteran Veteran

    Messages:
    166
    Likes Received:
    41
    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.
     
    #1
  2. Sixth

    Sixth Veteran Veteran

    Messages:
    2,121
    Likes Received:
    789
    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.
     
    #2
  3. Engr. Adiktuzmiko

    Engr. Adiktuzmiko Chemical Engineer, Game Developer, Using BlinkBoy' Veteran

    Messages:
    14,407
    Likes Received:
    2,821
    Location:
    Philippines
    First Language:
    Tagalog
    So, editing the system to check "greater than or equal to" rather than just "equal to" is also possible right?
     
    #3
  4. mylafter

    mylafter Veteran Veteran

    Messages:
    166
    Likes Received:
    41
    First Language:
    English
    Primarily Uses:
    N/A
    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!
     
    #4

Share This Page