Possible Bug: Teleporting from Lose Condition

Okay, so here's my bug, and it's kind of specific as far as I can tell.

I've set up an Event that calls for Battle Processing under certain conditions.

Under the Lose Condition: I've been trying to set it up so that my player sprite will teleport to another map location that I've saved through variables.  Currently, this lose condition simply references a Common Event to do this.  The sequence of events within the Common Event involve a few simple animations, the teleport, and then some dialogue.

This event works perfectly when I call it by itself, however, when I call it in the Lose condition of the Battle Processing call, it always glitches out right after the teleportation.  It simply skips everything after that moment and dumps you back into the game.  I have moved the teleportation call within the event to test whether there were any other factors, and no matter what, it's right after the teleport that it glitches.

I've also tried eliminating the Common Event altogether, and the same thing happens.

I've included some screenshots that show the Common Event (1-2) and the Event that makes the Battle Processing call (3).

Slight Update:  I've also now tried replicating the bug by calling for Battle Processing directly, and that works just fine.  So, now I'm really confused.   🙁

Buggy Code(1).png

Buggy Code(2).png

Buggy Code(3).png
Now don't quote me on this because I deal more with plugins than events, but I think transferring the map will stop the rest of the event from processing.
Now don't quote me on this because I deal more with plugins than events, but I think transferring the map will stop the rest of the event from processing.
I've tested that, and that is not the case, unfortunately.  The Common Event I set up works exactly as designed except under the very oddly specific conditions I am trying to call it under.
The problem is most likely a combination of timing problems and stacking levels - and you use a lot of stacking levels on the event with the battleprocessing.


Have you tried it in a simple event with only battle processing (no loop and no conditionals)?


And Zalerinian is right in so far as that we always advice to have the transfer command the last command in any event, because the events will get reset on map change.


And it depends on what type of command follows after the transfer - some commands may be executed after the transfer, but a lot of commands will break when the transfer is processed.


You might also want to read my tutorial about bughunting to learn more about timing problems and why it's extremely difficult to solve them.


(Link in my signature)
The problem is most likely a combination of timing problems and stacking levels - and you use a lot of stacking levels on the event with the battleprocessing.

Have you tried it in a simple event with only battle processing (no loop and no conditionals)?

And Zalerinian is right in so far as that we always advice to have the transfer command the last command in any event, because the events will get reset on map change.

And it depends on what type of command follows after the transfer - some commands may be executed after the transfer, but a lot of commands will break when the transfer is processed.

You might also want to read my tutorial about bughunting to learn more about timing problems and why it's extremely difficult to solve them.

(Link in my signature)
I have tried a simple event with only the battle processing, and that seems to work just fine.  

Original thread: https://forums.rpgmakerweb.com/threads/possible-bug-teleporting-from-lose-condition.48494/