Parallax Map Shifting After Player Transfer

Hello, community! I am in need of your help!

I am using parallax mapping (via Yami's Overlay Script), and was having an awesome time, until I playtested a section, and noticed something was off.

I have an event, in which in order to pass through a gate, the character must either hand over a knife, or offer himself to the gate. When you choose to offer the knife, when the player transfer to the next map occurs, the map is placed and appears normally.

When you offer yourself, after the player transfer, the map is shifted, and so the events are placed "correctly" in the engine, but it appears to be in random spots.

Upon inspecting the event screen, the only difference I can find, is that when the player offers themselves, there is a variable check to see if the player has enough MP to do so. However, I wouldn't think that a variable check would affect the map in any way. There are multiple branches throughout this event, and only the ones that end in offering yourself and doing the check end up with the map shifting. All other endings that have to do with the knife, transfer you to a correctly set map.

I'm hoping some extra pairs of eyes can see what is going on! I'm including some screenshots of the events (both the correct branch and the wonky one), and also the map properties screen for the map the player is being transferred to.

Thank you again!

HERE IS A LINK TO THE IMGUR ALBUM:
It would if you're using variables that the script uses.

The fact that you are using variable 1 is a dead giveaway. That script uses variable 1, so by changing it, you are changing the behaviour of the script.

One of the very first things you should do when adding a script is to see if it uses any switches or variables, and to see if you are also using those switches or variables for other things. If you are, you need to change the script. If you're not, or if you change the script to use switches or variables you're not using, you should then "reserve" those switches or variables by giving them names so you don't accidentally use them for something else later.
Oh my god you're right! I absolutely forgot that Yami's script uses the first few variables... oh lord. I knew it was some sort of obvious oversight on my part. I named the switches but not the variables he uses... so of course I used them myself, ugh. Thank you so much, @Shaz you are a hero. I was doing final playtesting on this and this was the only problem I hadn't been able to solve...

Original thread: https://forums.rpgmakerweb.com/threads/parallax-map-shifting-after-player-transfer.88553/