Joined
Dec 5, 2021
Messages
27
Reaction score
12
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
7,225
Reaction score
2,855
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
3,026
Reaction score
2,111
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 Threads

Latest Posts

Latest Profile Posts

For some reason a vegan webpage was suggested for me on FB. So I thought let's troll them. Because some of the posters needed a reality check.
I intended to start losing some weight starting today but It's apparently my birthday and I was given 2 big Toblerone's. So....Tomorrow then :p
JR.png
design for 1920's Jazz-singer
(can you guess what character inspired me here? xD )
Another brief AD video. Pretty proud of this.
new to game making and open to any help on getting started

Forum statistics

Threads
129,823
Messages
1,205,532
Members
170,950
Latest member
siko87
Top