NPC moves toward player and transfers player to another map

Ok, so i want an NPC moves toward the player after the Switch 1 is ON, after the NPC touches the player, it will transfer the player into another map. This concept is like, you know, in Yume Nikki game when you stab Toriningen with a knife she will chase the player and transfer the player into a dead end


To do that, I made an NPC using Event and then made a first event like this:


1ev_by_graytyphoon-daxdsp4.png



And then, i made another event like this:


2ev_by_graytyphoon-daxdspc.png



But the result is, only 2nd Event works, while the 1st one doesn't. That means the NPC doesn't move toward the player. How could i fix it? I'm still a beginner of RMVXA
That's because only the highest numbered page which is valid will run. So in your case, event 2 is the only on that is valid and will therefore be the only one that will run.


I'd actually recommend changing the event completely so that it is only one page, and only runs if switch 1 is on (see the page conditions on the left? Use those), then set the move route in the autonomous movement, and the event still is set to only run on event touch, and when it touches, it transfers you to the map.


You may also wish to take the time to work through the tutorials. The link to one is in the bottom of this post in the signature. Otherwise you're going to get stuck on how to use switches/variables again and again.
Try this:


ON PAGE 1 - 


Set no Conditions on the left


Set the Autonomous Movement to Fixed


Set Priority to Same As Characters


----------------------


ON PAGE 2 -


Set Conditions on the left to Switch 0001 is ON


Set the Autonomous Movement to Custom


Set the move route to Move Toward Player


Set Speed to 4 or 5


Set Frequency to 5


Set Priority "Same As Characters"


Set Trigger to "Player Touch"


Under Contents have:


 Transfer Player 


That should be all you need.  The event will be stationary and do nothing until Switch 1 is on, then it will chase you, and if it touches you, you get transferred.
Thanks so much for the help guys! It worked! 😀

Original thread: https://forums.rpgmakerweb.com/threads/npc-moves-toward-player-and-transfers-player-to-another-map.74350/