Party swapping not working on different maps

Hey, So I know it's a bit of a long shot but I was wondering if anyone can help me with my code in MV. I coded it so the player can split their party in two and they press a button and it swaps the party. Everything works except when the party is on different maps. What happens is the map ID of the party you are switching to gets over written by the current party making them appear in the same spot as the old party when you switch. So I'm trying to figure out why the x and y and mapid get overwritten but only when you are on different maps. My current solution has been to put everything in one map but it would be nice to be able to do things over different maps.





1697682714414.png

1697682803689.png

1697682843525.png

1697682908046.png

1697682962903.png


1697683009338.png

1697683042415.png
I didn't read through all of that because there's quite a bit there...but just to put it out there, HimeWorks' Party Manager is a free plugin that does what you're trying to do automatically.

Switch between parties with a push of a button, store all of the information about both parties, etc. No common events needed, you can reclaim all of those variables and switches (incidentally, you could make some of your stuff much easier on yourself by just storing the party array into one variable).

You may find it easier to install and configure one plugin than to troubleshoot this and figure out where your logical error is.
Wow, you are actually right his plugin seems pretty great. I actually found the issue being that parallel events stop once you change maps so it wasn't doing all the code. I changed half of it to autorun and it works great. Might use his plugin on future projects though.

Original thread: https://forums.rpgmakerweb.com/threads/party-swapping-not-working-on-different-maps.162143/