Teleporting player when touching an NPC but only if you are on a certain tile

I am trying to make a little quest where to have to chase around a little critter and put him in a pen.
The autonomous movement part is good. Its a little difficult to get the little critter to go where you want but it's achievable.

Once the critter gets in the correct location I want it to TP the player somewhere else.

I know how to set up the TP player but I cannot figure out how to make it work ONLY when the critter is in the correct location.

If I add the TP player part it will just TP you once you touch the critter no matter where you are on the map.
Can anyone give me any advice. I have been you-tubing ang googling for the last 3 hours, and since its not just a simple ( TP player when they touch the NPC ) thing, i have not had any luck in finding a tutorial on how to accomplish this.
Any help would be appreciated.
I’ve moved this to RPG Maker MZ Support as it is not a tutorial. Thank you!
I’ve moved this to RPG Maker MZ Support as it is not a tutorial. Thank you!
ok thanks
Make it a player touch event and put the teleport playet command inside a conditional if statement checking if the event is on a given tile coordinates (or you can go by regionId)
Make it a player touch event and put the teleport playet command inside a conditional if statement checking if the event is on a given tile coordinates (or you can go by regionId)
OK, thanks for the advice. I'll try and figure out how to do that.
I could be misunderstanding what you are trying to do, but here is something to consider looking at.

Your critter must be an Event. Events have coordinates. You can use Variables to get the X and Y coordinates of the Event (critter).

You would then use a conditional branch to check if the coordinates of the critter event equate to the specific tile that you want. If so, then teleport. If not, then it keeps checking.

You can find tutorials on event coordinates.

Some of my tutorials use event coordinates, but not specifically in this way.

I hope this helps.
I could be misunderstanding what you are trying to do, but here is something to consider looking at.

Your critter must be an Event. Events have coordinates. You can use Variables to get the X and Y coordinates of the Event (critter).

You would then use a conditional branch to check if the coordinates of the critter event equate to the specific tile that you want. If so, then teleport. If not, then it keeps checking.

You can find tutorials on event coordinates.

Some of my tutorials use event coordinates, but not specifically in this way.

I hope this helps.
Thanks

Original thread: https://forums.rpgmakerweb.com/threads/teleporting-player-when-touching-an-npc-but-only-if-you-are-on-a-certain-tile.158240/