Help with Timesystem

Hello everybody 😀

I have created a timesystem so I could costumize schedules for NPCs.

I've even made a clock (hours only :/ ) and a calendar.

My problem is that the timesystem gets stuck at sunday. Until then everything works fine but once it hits sunday it just stays sunday.

Could anybody tell me what I've done wrong?

Also is there a timer to make vegetables grow independent of which map I am on?

Thanks in advance 🙂

TIMESYSTEM.PNG

TIMESYSTEM2.PNG
can you please give full screenshots?

The screenshots above doesn't even show whether you're running that code in a common event or a map event, and it doesn't show the trigger setting which are rather important in this case...

Such a system should be run as a parallel process, and that would make the loop redundant because parallels automatically loop (both in common and in map events)
If your event is a common event that's on parallel process, you don't need the Loop and Repeat Above commands.


At a glance, I don't see anything wrong with your logic. Do you have any other events (including common events) that adjust that variable? Do you have any scripts that use it?
I noticed you don't have a variable for the days. Like, the 21st for example, how would you know when that is?
I think it just goes from week to week, allowing 4 weeks to a month. So it keeps track of days, but not dates.


Also, you need to change all your >= to ==, or increase the numbers it's comparing to by 1.


If your seconds start at 0 then reach 59, the moment they reach 59 it'll revert back to 0. So your 59th (or 60th) second is being skipped.


For days, it'd go 0, 1, 2, 3, 4, 5, 6 -> 0, so day 6 is actually being skipped all the time, and it'll go from day 5 back to day 0.


I don't think that's causing the issue though, but it does need to be fixed. You WANT it to count that last one and continue as normal, but to revert back AFTER (on the next increment).
Oh sorry it is a Common Event in a Parallel Process and the Trigger is Variable Clock Start.

I've made pictures that show up and tell what day it is (weekdays 0-6)

But I've found a script that also enabled to use variables (Selchars Timesystem) so I am going to use that one from now on 🙂
Yeah, if it's a common event, you don't need to put it in a loop.


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/help-with-timesystem.20864/