Trouble getting enemy to chase between maps?

Hello, I'm calling upon the RMMZ gods to spot whatever's causing me grief that I just CANNOT find. u_u I tried searching for a solution, but I was unable to find my issue specifically. Please point me in the right direction if somebody already has the solution to my problem!

I have a chase scene that extends between two maps. There are two doors on either side of the map, thus, making it loopable from my enemy. You need to pass through either of the doors a total of 3 times to automatically end the chase.

The chase starts fine, and when I enter the second map, the chase continues as intended. It's when I go back into the first map to keep up the chase that there's a problem. My monster no longer chases. In fact, when I go back up to the second map, he no longer appears, either!

I did try turning off the transparency and putting a random sprite in for the enemy spawning on map 1 after I entered from the door on the right, and that did work for a split second. But?? I'm unsure WHY that worked?? When I changed the sprite back to the monster (and even tried just not putting an image at all), it didn't work at all.

I'm sorry for the onslaught of screenshots, but I'm not quite sure where I'm going wrong, so I figured I'd add it all. I know it's a simple fix, but I'm not proficient with RMMZ so any help is appreciated, thank you~ * g*)9



For context on the pics:

1st: The initial code that spawns my monster for the first time. These switches are switched off immediately, as I wanted him to spawn in a specific location only once. After the chase begins and you move map to map, he spawns from a different location.

2nd: The code to both doors, entering from map 1 to map 2. I have them on their own switches so that my enemy may enter from the correct door when chasing.

3rd: The code of my monster in map 2. It's set on a conditional branch so that if the variable is equal to 3, the chase automatically ends. If not, it'll check which door you entered from and have the enemy spawn from the corresponding door.

4th: The code to both doors, entering from map 2 to map 1. I have them on their own switches so that my enemy may enter from the correct door when chasing.

5th: The code of my monster in map 1. It's set on a conditional branch so that if the variable is equal to 3, the chase automatically ends. If not, it'll check which door you entered from and have the enemy spawn from the corresponding door.

6th: A better view of my maps. A black line separates them.

7th: And just an easier to understand list of my switches, because there's a lot going on here, haha.

8th: OOPS, I forgot to include the 4th tab in the transfer to map 2 pic!! This is after the initial switches are turned off and my full chase switch is turned on!
Welcome!

Event 12 page 2: The top of it seems superfluous. What's the point in checking whether the switch is on when the very first line of the event turns it on? That will never not be true. Just get rid of the switch and the conditional.

As for the rest...I admit it's just way too much for me to read through and mentally plot out to see where the error is.

It looks like this is overcomplicated for what you describe. There are simpler procedures to use events/scripts/plugins to make an event chase the player without these multiple pages of convoluted move routes.

If you're finding that events are not running when you expect them to, there has to be a logical error in the page conditions. Making them more streamlined and having fewer pages will help resolve this, also.

A couple of side tips:
- It seems odd that you've said you're working with RPG Maker 2003 in your profile when this project is in MZ 😉 Nothing wrong with it, but it may cause people to waste posts making sure you're asking about the same engine they're answering for.

- I see you reference some files that have spaces in their filenames. This is bad practice, as on some systems that can cause the deployed game to have errors trying to load the files. You should make sure all filenames in your project are HTML compliant.
Welcome!

Event 12 page 2: The top of it seems superfluous. What's the point in checking whether the switch is on when the very first line of the event turns it on? That will never not be true. Just get rid of the switch and the conditional.

As for the rest...I admit it's just way too much for me to read through and mentally plot out to see where the error is.

It looks like this is overcomplicated for what you describe. There are simpler procedures to use events/scripts/plugins to make an event chase the player without these multiple pages of convoluted move routes.

If you're finding that events are not running when you expect them to, there has to be a logical error in the page conditions. Making them more streamlined and having fewer pages will help resolve this, also.

A couple of side tips:
- It seems odd that you've said you're working with RPG Maker 2003 in your profile when this project is in MZ 😉 Nothing wrong with it, but it may cause people to waste posts making sure you're asking about the same engine they're answering for.

- I see you reference some files that have spaces in their filenames. This is bad practice, as on some systems that can cause the deployed game to have errors trying to load the files. You should make sure all filenames in your project are HTML compliant.
>_< Haha, thank you for the reply nonetheless! I knew there were no plugins that would seamlessly allow the chase to go between maps, and it was such a short chase scene, I was hoping it could be done with the vanilla tools at hand. Buuut, I think I'll just have to look for a plugin that suits what I need!

Lol, it's funny you mention that 2k3 tag! When I first signed up, I was using that engine. >_< But upgraded not too long after. For the life of me, I couldn't figure out how to change it on this profile, so I just left it alone!

Thank you for the tips, nonetheless! At least I can get some files and switches sorted. >_<!!
Well you certainly don't have to use a plugin. Even without it, I don't think you need such a convoluted pile of pages.

I'd suggest you back up a step and do what we call pseudo-code - write down the set of logical instructions you need to tell someone in order to make the thing happen.

For example, if I were telling you to chase someone, I wouldn't have some long move route where you move up, left, left, up, up, right, etc. I would say "Move one step toward the person. Then see if you caught them." And that just loops.

Original thread: https://forums.rpgmakerweb.com/threads/trouble-getting-enemy-to-chase-between-maps.159682/