Event respawning even with self-switch

Hello! I know events respawn once you reload a map but I was sure they stayed on the page where the self-switch was set.

See, I have a parallel process event that checks the region of the player and once done, it transfers the player to another map and finally the event goes to a second page with a self-switch condition. The problem is that whenever I enter the map I just left, the parallel process keeps on checking the player's region even though that same event already passed to a self-switch blank space.

Any thoughts on how to fix that so when I return to the map, the event stays non-active? I have other similar events with almost the same commands but here, I included the map transference, maybe is that what's killing the commands???
Hello! I know events respawn once you reload a map but I was sure they stayed on the page where the self-switch was set.

See, I have a parallel process event that checks the region of the player and once done, it transfers the player to another map and finally the event goes to a second page with a self-switch condition. The problem is that whenever I enter the map I just left, the parallel process keeps on checking the player's region even though that same event already passed to a self-switch blank space.

Any thoughts on how to fix that so when I return to the map, the event stays non-active? I have other similar events with almost the same commands but here, I included the map transference, maybe is that what's killing the commands???
Have you actually turned the self switch on in the event's first page?
Does anything change if you move it above the Transfer Player command?
In any event command sequence, transfer player should be the last command.

That is because going to another map deletes all events on the current map, including the one with the transfer command. Which means there is no guarantee that any command after transfer is still executed.

Some commands will get executed but the rules for that are too complex to be explained without a good basis in programming, and it is safer to sort the commands to do transfer as late as possible in the sequence.
Does anything change if you move it above the Transfer Player command?
Yes, indeed. @Andar when I move the control self-switch, the transfer doesn't get done. That's why I have placed it where it is. I suspected it was a matte of organization.
Some commands will get executed but the rules for that are too complex to be explained without a good basis in programming, and it is safer to sort the commands to do transfer as late as possible in the sequence.

Well, there's an easy way to explain that based on this particular case. You can change the state of a game switch anywhere because they're global by definition. This means it will work normally.

Do the events from the "inn map" get deleted? Not exactly. They get replaced by the current map's events. What happens with the inn event? It gets to execute almost all of the commands, sometimes even all of them for a single reason. The Game_Interpreter class still keeps a reference to it, meaning that even the self switch does get activated. Yes, I am not just relying on theory but also in practice. I recreated your event without those 2 previous conditions and the self switch does get activated as expected. Why? Again, it's stored in a global variables so it will be executed and safely stored there.

If yours doesn't stop executing itself, then your condition is lacking something. Not even the transfer player command should have stopped you from doing so. OR your second tab / page has no Self Switch A condition setup there as it should be.
when I move the control self-switch, the transfer doesn't get done.
THAT is an indication that something in the game interpreter is messed up. There is no command in that sequence that would have prevented the transfer, and indeed nothing that could theoretically prevent the switch in the current sequence.

However both effects would happen if the interpreter was changed to update between commands, something it would not do without a script changing the Ace engine.

There are several scripts that do that however, so it would be nice to get the list of your added scripts.
Isn't this just a problem with the event being a parallel processing event? If I recall correctly, unlike autorun events which will just kinda form a queue, parallel processing events will completely stop running after a transfer command, no matter what.
Edit: Switching event pages will also stop parallel processing events(doesn't matter if the event page doesn't do anything, it will stop it regardless.)


The only solution I could think of is to split the first command page into 2(so you would have three event pages), with the second event page being an autorun event that has the transfer and control switches commands.
Does anything change if you move it above the Transfer Player command?
Yes, indeed. @Andar when I move the control self-switch, the transfer doesn't get done. That's why I have placed it where it is. I suspected it was a matte or
Isn't this just a problem with the event being a parallel processing event? If I recall correctly, unlike autorun events which will just kinda form a queue, parallel processing events will completely stop running after a transfer command, no matter what.
Edit: Switching event pages will also stop parallel processing events(doesn't matter if the event page doesn't do anything, it will stop it regardless.)


The only solution I could think of is to split the first command page into 2(so you would have three event pages), with the second event page being an autorun event that has the transfer and control switches commands.
Thanks I was thinking the same! To split the thing in three.
and as I said that can only happen if something messed up your scripts.
So please list the scripts you added to the script editor
THAT is an indication that something in the game interpreter is messed up. There is no command in that sequence that would have prevented the transfer, and indeed nothing that could theoretically prevent the switch in the current sequence.

However both effects would happen if the interpreter was changed to update between commands, something it would not do without a script changing the Ace engine.

There are several scripts that do that however, so it would be nice to get the list of your added scripts.
It's weird because if I move the self-switch after the transfer command, the transfer doesn't get done. I will try to reorganize the events in different pages.
I will try to reorganize the events in different pages.
this has nothing to do with your events, it's your scripts that are the problem.
As I asked several times, please post a screenshot of your script editor's materiels list.
and as I said that can only happen if something messed up your scripts.
This is incorrect.

I just took two minutes to test, and what @Howard_Bentley said is absolutely right.

When the event is running in parallel, the engine with no modifications will stop running commands after a Transfer Player.

His proposed solution is absolutely correct - make the parallel event toggle a self switch to go to a page that's Autorun and then that will be able to Transfer Player and toggle self switch B to go to its third page.
These results prove the following conclusions:

ONE of the autostart events stays in memory (even after a player transfer, for a while at least) but parallel events get stuck because they get replaced by the new map's list of events. Since they're parallel, the Game_Interpreter has no reason to keep a valid reference to any of them, halting execution abruptly and switching to a new list of parallel events.
One thing that I found interesting about parallel processing events is that they seem to stay loaded long enough to run one more command after a transfer event.

For example, if you have this:

Text A:
Transfer:
Text B:
Text C:

Text B will be displayed after the transfer event has finished, but Text C won't be displayed.
It has not been replaced before a frame has passed. So yes, it's possible to have had enough time to pass the text to $game_message, again a global variable available everywhere...
EDIT: Ok, seems I might be confused how events work, LOL. 😀

I'm confused by some of these posts. Isn't what Andar is saying completely right? There's no reason the transfer wouldn't activate if it's the last command (unless you've changed the engine behavior). And there's no reason to use 3 pages?
Isn't this just a problem with the event being a parallel processing event? If I recall correctly, unlike autorun events which will just kinda form a queue, parallel processing events will completely stop running after a transfer command, no matter what.
Edit: Switching event pages will also stop parallel processing events(doesn't matter if the event page doesn't do anything, it will stop it regardless.)


The only solution I could think of is to split the first command page into 2(so you would have three event pages), with the second event page being an autorun event that has the transfer and control switches commands.
Guys, it's done. I could fix it. I used the transfer command in a second page triggered by Autorun and that could help me get the self-switch B in a third page. Everything ran as expected.

I can close this thread. Thanks for the idea(s).
This thread is being closed due to being solved. If you need it reopened, report it to let us know why. Thank you!

Original thread: https://forums.rpgmakerweb.com/threads/event-respawning-even-with-self-switch.161862/