Moving between maps with a "pet"

I have a pet following the player at a slow pace so sometimes the char. out runs the slow moving pet. which in this case is just a event with "approach" selected as the movement option. Is there a way to make it so I can only transition between maps if my pet is also close by. Like if he were too far it would make you wait on him. 
Events cannot move between maps, so you'll have to make a new event on each map and have it prevent to be the same pet.


Then you'll need to edit all transfer event and add code to check if the pet-event is near when triggered and only transfer when yes - this can be done by a series of control variable commands with conditional branches.


And on each map you'll need an autorun event that places the pet event near the player and then erases itself.


One tip: this is a lot easier if the pet event has the same event ID on every map. Which means that it always has to be created first after making a new map to get ID=1

Original thread: https://forums.rpgmakerweb.com/threads/moving-between-maps-with-a-pet.59511/