Light cycle breaks game

So this map is an Inn, interior. There is a short cutscene and that's it no problem. But now I added this event in the top corner (pic related) and when I playtest again, when I go inside the in, the game lags terribly and then crashes and closes itself. When I remove this light cycle event, the Inn map plays as normal and no frame lags or anything, but using this event to control the lights inside just drops framerate to 3, lags, freezes and breaks my game. Does anyone have any idea why?
Outside in the town I used a similar event to control daylight outside and the game runs fine with tons of parallel events, why is this breaking my game inside a tiny inn with barely 5 even common events and not a single paralllel one to interfere?
Since everything is greater than or equal to 0, I would think all of the event page is trying to run. (0 to 18 hours)

Maybe have a conditional branch that checks for a switch first, then the hour? That or have two conditions for each, one that is greater than and the other less than. Like greater than or equal to 5 but less than or equal to 0??
Why so much eventing you can use the Terrax Lighting plugin, and a common events. You can add for say example Light 1 all switch on at 9:00am and Light 2 can be turned on say 03:00 o clock. so any lighting you have all you would need to do is note tag them as LIGHT 1 #FFFFFF and all light one objects in the world will switch on or off.. same with light two if your using differant lights.. you can also add FIRE 1 #FFFFFF for flicker effects.. look it up. Terrax lighting plugin. See my butterflies thats 1 light setup and the other being the fire sticks. they are swicthed on independtly, you can get a day/time plugin Orange time system.

1603074677643.png
Try adding in Wait times say 20 frames or 30 frames and add in a self Swicth A on at the end. because your eventing is doing to much to fast and over again.. as it's parallel
@Triangle45
your problem is that parallel processes are executed sixty times per second, and that takes processing power.
as said above you'll need waits (which basically tell the engine to skip processing for x frames) to reduce that lag.

however I don't know if that event even needs to run continually - how often does the hour change?
If the time system is slow you only need to run that event once on entering the map, erasing it afterwards.
and even if the hours count in minutes you might change that and similar events into something that is only triggered on variable changes, like makin the hour variable a condition on pages etc (it's a bit more complex than it sounds if you want to experiment with page conditions however)
I will check that plug in that you mention, but why is this event lagging and breaking the game? I have a similar one running outside in the main village that checks the time and tints the screen according to the hour, in fact I just copied pasted that event in the inn and now it breaks the game? I have way more events running outiside than inside.
Try adding in Wait times say 20 frames or 30 frames and add in a self Swicth A on at the end. because your eventing is doing to much to fast and over again.. as it's parallel
Where should I add the wait times? Between each check command or inside each one of it?
in fact I just copied pasted that event in the inn and now it breaks the game?
because lag is additive, and partially depends on other factors - but also on the available reserves.

To say that the last event added was bad is the same as saying the last beer was bad - and that the twelve before that didn't matter...
If you used the same event at other maps, then in all cases it was a bad event due to the way it works. But the effect it has also depends on what other objects are inside the main game loop, and other objects can both speed up or slow down the rest of that main game loop.

and the wait should be either at the beginning or as the last command of that event.
Where should I add the wait times? Between each check command or inside each one of it?
i'll say here if your keeping the events but i think this is a much more complicated way of doing things.
1603243374212.png
because lag is additive, and partially depends on other factors - but also on the available reserves.

To say that the last event added was bad is the same as saying the last beer was bad - and that the twelve before that didn't matter...
If you used the same event at other maps, then in all cases it was a bad event due to the way it works. But the effect it has also depends on what other objects are inside the main game loop, and other objects can both speed up or slow down the rest of that main game loop.

and the wait should be either at the beginning or as the last command of that event.
haha I understand better now, I thought each map was independent of the others. In that case then I will try to using a plug in.
I was looking and found MOG's TimeSystem, it allows the use of switches and variables depending on the time, would you recommend that one?
i'll say here if your keeping the events but i think this is a much more complicated way of doing things. View attachment 164629
I will try deleting my clock system and instead use a plug in then, I found MOG's TimeSystem what do you think about that one?
I will try deleting my clock system and instead use a plug in then, I found MOG's TimeSystem what do you think about that one?
I'm using Orange time system but i'm sure they will all do a simular thing it's all going to be worth it and better for your game then that much eventing and processing. it can all be achieved with note tages. good luck.

Original thread: https://forums.rpgmakerweb.com/threads/light-cycle-breaks-game.128865/