The first thing you want to do is making a
Common Event called Player Location trigger set to NONE.
Inside that you will put:
Code:
@Control Variables: [0099: Player X] = Player's Map X
@Control Variables: [0100: Player Y] = Player's Map Y
If you are wondering where are those options, they are further down on the control variables screen, inside the Character option.
This will track down exactly where the player are when the event are triggered.
Now that we are done with the common event, let's go back to the trainer.
I'm setupping the female trainer with trainer(2), but it can be any number of tiles that you want, the difference will be the amount of conditional branchs inside your event.
Also, I'm doing the entire event in Lappet Town (it's the main map I use for event testing) so you will have to change values for your event. I'm using the COOLCOUPLE trainers for this.
I recommend that you make the event in the same map as mine as you follow this tutorial.
Trainer(2) - Event touch trigger
1st page:
Code:
@>Call Common Event: Player Location
@>Conditional Branch: Player is facing Right
TEXT AND BATTLE PART HERE
: Else
@>Conditional Branch: Variable: [0099: Player X] == 13
@>Conditional Branch: Variable: [0100: Player Y] == 15
TEXT AND BATTLE PART HERE
: Else
@>Conditional Branch: Variable: [0100: Player Y] == 16
@>Set Move Route: This event
: :$> Move Down
@>Set Move Route: [Double Trainer M]
: :$> Move Down
TEXT AND BATTLE PART HERE
Depending on how you setup your trainers to be, looking horizontally or looking vertically, you will have to swap Player X with Player Y.
The coordinates you will find in the right down corner of RMXP right after "002: Lappet Town (32 x21)". It will be something like 014,015 without parentesis.