Events Rushing & Skipping Event Commands

So about 25 hours of gameplay into my project, my game has developed a little quirk.

If there are a series of switches, states, events, transfers, whatever, it plows through to the last one and skips the rest. This has never been a problem before. I just started noticing it recently, and figured I was probably not clicking the "Wait" box when I should have, but while playtesting it from the beginning, I'm noticing it happen in several places that have been playtested a few dozen times with no problems. Now, I'm finding it in several places. 

event.skipping_zpshxrqbhrk.png


In the example above, if the event is activated, you're transferred to the new map.

The Show Animation never goes off (this can be fixed with "Wait" clicked)

The Control Switch will still be on.

And the Change State buff will not be applied.

I can stall the event by putting the Animation, with "Wait" clicked, at the bottom just before transferring, but the switches and states should still all be working regardless. Why is the processing suddenly rushing? I mean 60 actions per second should be plenty to handle these 4. 

Anyone else seen this issue and/or know what I did to create it?
Show the WHOLE event window, and if there are several tabs, so all the ones following the one you've got up there.

No use asking us for help and only giving us a little snippet of information.
The engine cannot ignore or skip event commands (unless you damaged the engine with wrong skripts), all event commands will be executed at exact order.


What you most probably have is a timing problem created by splitting commands that should be in sequence over different event pages with different conditions.


There is a reason why the most important advice over any cutscene is to get all commands for the cutscene into a single controlling event (and on a single page there).


You can follow the "Bughunt" link in my signature to learn more about this, but the problem usually is within the page triggers and page conditions resulting in the wrong order of page executing - and that is the part you didn't show in your incomplete screenshot...
That was only an example I put together of varies occurrences. One of the actual incidents does much less before the transfer, and only recently, has been experiencing the problem. I'll post a pic so you can see it. 

event.skipping2_zpsrpnqzfyx.png


Control Switch[20] controls the weather. When transferring, the switch turns off, the weather is reverted to normal on the new map. Only recently when playtesting has the Control Switch not turned off. Hence, it's storming when it shouldn't. 

I've created a work around for this particular issue with Fadeins and Fadeouts that give me a little more control. Without them, the event zips right to the transfer skipping the Control Switch.

I wonder. Could DoctorTodd's Autosave feature be disrupting the commands? A transfer creates an autosave.

EDIT: @Andar: I don't use page triggers unless it's to change a graphic. All cutscene events or the like are operated by 1 event, 1 page. Not about to sit here with a stopwatch and a calculator to do something that can easily be done with 1 event. 

I am aware the engine isn't supposed to skip commands. It's been working fine for the last 8 months. It's only in this 9th month of my project, 25 hours of gameplay in, that it has suddenly become... quirky. Switches are not activating as they should be before transferring to a different map. I've had to alter several pre-transfer switches to get them to work. I shouldn't have to.
I would be looking for other higher-numbered pages that are being activated, or scripts that are conflicting with your switches/events.

That's why I asked for a full screenshot - so we could see if there were other pages that could be active.

Are you sure all those script conditions are being met?
You need to reorder your commands, because the transfer command creates something similiar to timing problems:


Whenever a new map is loaded, all events are reset and re-initialised.


So when a transfer command goes to a new map, it should be the last command executed on the old map.


Sometimes command after the transfer command in an event on the old map may be executed, but that can't be guaranteed because it depends on the internal command sequence and structure.


So especially the script command and the control switch for 48 can never guaranteed to be executed after the transfer to a new map.


However, commands before the transfer are always executed unless the engine is damaged or something else interferes. You should check where else the switch 20 is controlled, especially in parallel processes on the new map.


I think what really happens is that it is switched off on this map and switched on again before you can detect that it was off for one or two frames.
The only time I use switch 20 is on the map where this event is. Switch 48 and the script call work just fine after the transfer oddly enough. It's the one previous to it that is now having the hiccup.

But we're getting hung up on this one event. This is happening all over my project with switches just before transfers. If I don't do something to stall it, it doesn't get turned on or off. It only started happening about 2 weeks ago, over 3,000 hours into my project. With no break in commands such as a Wait, Text, something that has to fully complete before the next command is started, the commands are skipped, and the event goes right to transfer. 

I just went through and found a few of them, and I found a pattern. They all have to do with a switch that controls weather. The weather event is a parellel process that loops the weather with a max wait time of 600 frames before it repeats.

In every case, I'm on a boat. There are several maps tied to this boat map. Cabins, below deck, etc. Rather than creating a multitude of Set Weather On/Off commands for all the doors on each map, I controlled it with a switch on at the beginning and off at the end.

I can understand the Set Weather not being turned off since it is on a 600 frame wait with no event to tell it to stop after transferring, but the Control Switch should be off regardless. It's not turning off. It's being completely ignored.
then please show us screenshots of the event controlling the weather - there are a few things that could cause this depending on how that event is structured, because the wait command works differently depending on how an event is triggered and where the command is placed.
event.skipping3_zpsu7av81st.png
Just a thought:

If switch 20 only gets activated on the ship, and you turn the switch off just before trasferring off the ship, is it possible another event on the ship is somehow being triggered and running in parallel to this one, turning the switch back on before the transfer finishes?
Parallel Processes automatically loop - placing a loop inside a parallel process will only throw off timing and mess with the results, so please remove that loop from the event.

Second, disabling that event does not stop the storm from continuing - you usually need to set weather to none to stop the effect - where do yo do that?
@Leitha: I'd considered that, but after checking, it's only turned on by a transfer from different maps when boarding the boat, and turned off when exiting the boat completely. 

@Andar: <facepalm> I hadn't thought about that. I'll definitely take that out. As for disabling the weather, the switch has always handled it fine. It's only recently in the past 2 weeks that it's stopped working. 

But the Set Weather control switch isn't the only switch not turning on or off when transfering. In another incident, I'm transfering, again to the boat, and 2 switches were being turned on. The Storm Control one and a cutscene activation switch. In this case, the weather switch is on and working fine, but the cutscene switch is ignored and left off.

event.skipping4_zpsqw3h4prw.png


Here, Switch 20 is turned, but Switch 121 is ignored.
what does that self-switch A do in that event? Please tell me that it doesn't trigger the third page, please?

(if yes, it needs to be before the transfer command or again it can mess with page processing...)
Control Self Switch does trigger the third page, but it's well before the transfer. The command before it is an Animation.

(I created a teleport animation: I confused myself looking at it a couple of times.)
Control Self Switch does trigger the third page, but it's well before the transfer.
That's the mistake I'm talking about - it needs to be directly before the transfer, because as soon as that switch is turned on, the next page can become active (disrpting the remaining commands) as soon as there is a frame triggering.
The third page has no commands and an Action Button trigger to activate it, so until it's activated, only the Graphic is displayed. I could see an autorun or parallel process disrupting it, but not an action or player touch page. But I'll test it anyway...

Ok... I playtested both scenarios again and created a few to test it out.

Put the Control Self Switch at the bottom. That dang Switch 121 was still not flipping. I deleted the ocean storm, and put it in manually. Now Switch 121 is saying it is on. I have no idea why that is causing the hiccup. The Switch should be turning on regardless. 

The Ocean Storm switch is now turning off from the original occurrence, but the weather is not. All I can think is that in all those previous times of playtesting, the timing just happened to be at the right moment for it to trigger... *shrug* I don't know. Either way, I deleted the parallel process that controls the storm, and manually adjusted the Weather and BGS in each door, room, and upon exiting the boat.

As for the Control Self Switch, as long as it is not activating an autorun or parallel process, each command after the Control Self Switch should trigger whether transferred or not - unless it conflicts with the current map. Like a Set Event Location, a Set Move Route or a Control Self Switch to an event that is no longer there.
it doesn't matter what on the next page is - switching to that page will disable the current one, even if the third page is empty and on action trigger. Just place different sprites on the pages to see if that is happening.


And it sounds to me as if those switches were used in other events or scripts without you remembering that they are used there.


Event commands CANNOT be skipped unless the event page is changed. What really happens is probably that they are turned correctly and turned back by some event that you completely forgot.


You need to find the other events and scripts that also operate those same switches - there you will find the cause of your problems.
Ok. I'll keep looking. 
I haven't read all of this. 

You don't need to repeat that weather event at all.  

Weather does not need to be repeatedly set.  You set it once, and then you set it when you want it to change.

The normal way to do weather is to do it in a parallel process event that has TWO commands.  Change Weather, and Erase Event.  Set it up like that and see if you still have the problem.

But that event doesn't change the switch, so I'd be surprised if it makes a difference.  It's still the better way to do it.

I'm still looking at scripts as the culprit.  To be sure, you could make a copy of your Scripts.rvdata2 file so you don't lose anything, and then replace the original with the same file from a brand new project, with NO scripts added.  Go to a map that was having the problem (hopefully one that doesn't have any calls to the scripts that you added, which would then crash the game), and see if you can reproduce the problem.
Ah! I never considered using Erase Event in my weather event. That would eliminate the manual adjustments when entering the map. Exiting, of course, would still need a Set Weather: None command.

I'm also thinking a script is the culprit. I've made several changes to a few events to get them to work as I intended, but the problem in itself isn't fixed. And I don't like workarounds that simply ignore a potential problem later. I'll have to try and put everything back the way it was and test it without any added scripts. Then I'll start adding them in one by one. I'll let you know happens.

Original thread: https://forums.rpgmakerweb.com/threads/events-rushing-skipping-event-commands.45268/