Transfers Between Maps

So while transfers make a ton of sense when going from one map to the same point on another map, (leaving or entering a village) I'm wondering how you do it without losing your mind if you have say, 2 60x40 maps sitting next to each other and you want the user to move between them and retain their height. For instance, I walk onto 59,20 (the far right edge of the first map) and I want to end up at 0,20 on the second map. Likewise for nearly all the other far right edge squares on the first map, but I want them to end up at the same Y value on map 2. I see that I can go in and do quick event transfers for each square, and have it target the corresponding square on the other map.

But doing it that way is a unique event for each and every square on the side of the first map and the same on the other map to walk back. I have to imagine someone has a smarter way to do this 🙂 Otherwise event city time for me just for the user transfering between sides. 
use variables for targeting coordinate - first control variable to load the X-coordinate, then control variable to set the y coordinate and target map depending on where you are.


And if you do it by common event on parallel process loop (don't forget a wait(10) or so) checking positions with a conditional branch, you won't need a single map event.


However, the correct number of waits to prevent lag might be tricky that way.
There's a script for that. http://www.rpgmakervxace.net/topic/12288-map-edge-transfer-vx-ace-v23-updated-0921/
This worked like an absolute charm. Thank you Jack and Andar!
Oh, Andar. You mention using a Wait event. If I have my parallel event working, setting the correct map-to variables - should I be putting a Wait(10) at the end of the variable sets, or should I just put an Erase Event in the line after the variables are set? I would imagine that makes it set the variables once on entrance to the specific map, then not have to do it again constantly. But I'm still wrapping my head around events 🙂
The problem is something else - parallel prozesses repeat sixty times a second, which can create lag and you don't need to check the player coordinates sixty times per second.


wait(10) in the case of parallel processes simply means "skip the next ten frames", so a parallel process with wait(10) is only executed six times per second, not sixty times.


Zephyr Games, please avoid double posting, as it is against the forum rules. You can review our forum rules here. Thank you.
Will do Andar. Thanks for the heads up on the double post as well!

Original thread: https://forums.rpgmakerweb.com/threads/transfers-between-maps.44021/