Night and Day Cycle with an event

TicklishWasabi

Veteran
Veteran
Joined
Nov 7, 2017
Messages
167
Reaction score
18
First Language
English
Primarily Uses
N/A
I created an event that tints the screen several times, creating a night and day cycle. It activates once a switch is set to on, and if the switch is turned off it stops. But the screen never tints. What did I do wrong?
N&D cycle.PNG N&D cycle 2.PNG
 

Arthur França

Veteran
Veteran
Joined
Nov 3, 2017
Messages
40
Reaction score
27
First Language
Portuguese
Primarily Uses
RMMV
Well, do you have a timer or a variable wich counts the time to turn dark an dawn? Cause I dont see when the SwitchA will be off.

I'm sorry if I wasnt too helpful, but I think Ive seen a plugin made from yanfly with that purpose.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,111
Reaction score
13,715
First Language
English
Primarily Uses
RMMV
It never tints because the very first time it runs, you turn on self switch A, which activates page 2, which does nothing.

You only use a self switch and a second page for a parallel process if you want to do something once only, and never again.
You use erase event for a parallel process if you want it to run some commands as soon as the map is loaded, and not again until the next time it loads.

Because yours is something you want to run continually, you should not use a self switch OR erase event. Your switch and conditional branch are also unnecessary. What's the point of saying "cycle = ON" followed immediately by a condition to say "if cycle is ON"? Of course it's going to be on, because you just turned it on.

The other thing you need to consider is, because this is a map event, it's only going to run on this one map. As soon as you move to another map, it's going to stop running. When you return to this map, it's going to start over, with the original tint. So you could have bright daylight, dusk, midnight, then walk into a building and out again, and suddenly it'll be bright daylight again because it started over at the beginning. If you want this to run between maps and not lose track of where it was, you need to use a common event rather than a map event. THEN you will need to make a map event to turn on the switch, and condition the common event by that switch (because parallel common events can only be run when a switch is on) - don't use a Conditional Branch event command.
 

Cunechan

Veteran
Veteran
Joined
Jan 28, 2015
Messages
90
Reaction score
91
First Language
German
Primarily Uses
RMVXA
When you turn on the A switch it switches to the next event page eventually? maybe try putting the self switch A = on at the end, after the conditional branch?
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,111
Reaction score
13,715
First Language
English
Primarily Uses
RMMV
You don't want the self switch A on at all, because this event needs to cycle.
 

Arthur França

Veteran
Veteran
Joined
Nov 3, 2017
Messages
40
Reaction score
27
First Language
Portuguese
Primarily Uses
RMMV
If you paste the page 1 to page 2, switching "A" to off and restoring the enviroment light, it should work as a loop
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,111
Reaction score
13,715
First Language
English
Primarily Uses
RMMV
You're thinking too deeply. The event isn't working BECAUSE there's a page 2. It isn't necessary at all. Getting rid of it and the switch & self switch will solve the problem. It will work as a loop by default because that's what parallel process events do.
 

Arthur França

Veteran
Veteran
Joined
Nov 3, 2017
Messages
40
Reaction score
27
First Language
Portuguese
Primarily Uses
RMMV
Hmm... Ive never tried it yet, so I didnt think clearly how to made it. But u might be right
 

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

Latest Threads

Latest Profile Posts

Don't forget, aspiring writers: Personality isn't what your characters do, it is WHY they do it.
Hello! I would like to know if there are any pluggings or any way to customize how battles look?
I was thinking that when you start the battle for it to appear the eyes of your characters and opponents sorta like Ace Attorney.
Sadly I don't know how that would be possible so I would be needing help! If you can help me in any way I would really apreciate it!
The biggest debate we need to complete on which is better, Waffles or Pancakes?
rux
How is it going? :D
Day 9 of giveaways! 8 prizes today :D

Forum statistics

Threads
106,051
Messages
1,018,549
Members
137,837
Latest member
Dabi
Top