Joined
Dec 5, 2021
Messages
11
Reaction score
9
First Language
Japan
Primarily Uses
RMMV
Hello everyone!
I done my own day/night system on my global map and it work perfectly. The problem is, that if I change interior for other like I go inside house, all day/night system reset :(
I’m not so good by this scripts and events. I was thinking about „universal time” for all areas in game indoor and outdoor. I have no idea how to „set” this. I was looking for a plugins, but they are not better then mine. All the time is a same problem. You go inside house, time begin at 0:00. You go outside, same. I have no idea how to „save” same time between House indoor and global map. It will be perfect when this nubers are same and work like it should be. I tryed with variables, but if I leave house, time back to „noon” time. I tryed skipp time +8h if player go sleep, with no success :( I tryed with visual effect like timer, but it work funny. How to set max 24h? No idea. Ok, let’s see how do i do it:
// time is a day
//

//global map: it’s a beginning map;
variable: time=0
variable: Hours=0
variable: Min=0

erese event

if variable:Min=60
then variable:Hours+1

if variable:Hours=24
then variable:time+1

wait(900)
set variable:Min+1
wait(300)

set: parallel_process
Guys can you tell me, how to do this? I’m sure it is possible.
 

ShadowDragon

Realist
Veteran
Joined
Oct 8, 2018
Messages
5,428
Reaction score
2,140
First Language
Dutch
Primarily Uses
RMMV
you main problem on this event is the erase event.
when you go inside, the time stops or continue,
but when you go outside again, the event run again because of "erase event".

so the variables resets to 0 again.

I would suggest if you want a time system to make it in a common event.
if you done that already, remove the "erase event".

there is an advanced time system if you want to do it correctly.

min = 60 is probably something you want to avoid as well, but use
min >= 60 and set that variable to 0, if you = 60, it can skip to 61, 62, 63 etc
if the player is lagging or get frame drop to by pass this and the timer break.

specially if you use time check to open and close stores/houses for example.

and [here] is an advanced time system (adjust to how you want it to be.
 
Joined
Apr 30, 2012
Messages
222
Reaction score
37
First Language
Spanish
Primarily Uses
I done my own day/night system with events. I dont have problem with the time but the weather changes when switching to other maps.
 

gstv87

Veteran
Veteran
Joined
Oct 20, 2015
Messages
2,708
Reaction score
1,778
First Language
Spanish
Primarily Uses
RMVXA
variable: time=0
variable: Hours=0
variable: Min=0

*NOPE!*

that's a big rookie mistake.
time itself isn't hours and minutes, time *is*, period.
*we* then cut it down for ease of handling, but if you go up the scale of time, your hours and minutes got nothing on the trillions of iterations of orbital loops of the universe.

don't count hours and minutes, count *ticks*.
sum up the total of ticks into one "day", and then cut down that "day" into it's fractions to present to the user.
up front, you'll present hours and minutes, but behind the scene everything is being dealt with as a big pile of *intervals*, from 0 to a maximum X.
 

Latest Profile Posts

I wonder... If I develop my own game hacks, does it count as beating the game my own way?
First 12 minutes of gameplay.

bio-Synthetica's Database plugin is complete. Players will be able to find and unlock various tutorials and lore as they reach certain points. There are 5 categories of files you can unlock: Audio Clips, Data Files, Bestiary, Earth History, and Tutorials.

1653160049600.png

Thank you Dsiver for this amazing plugin! :kaothx:
My favorite kind of progress? Reverse progress! First, change some small feature of your game. Second, go back through and change 6,000 tiny things related to that minor alteration just to get your game playable again. What fun!

Forum statistics

Threads
122,008
Messages
1,145,852
Members
160,274
Latest member
Kirimatsu
Top