Yeah. But there is a far easier way to make the trainer's vision.
I make my trainer, is that my trainer is set as a collision event(instead of action key). So, if you run into him, you'll get seen, or if he runs into you. I also set his speed as maximum(6 i think),
Then I made a seprate blank event, which is the trainer's vision, It would also be collision event. I put a move command. The target would be the trainer I created. The move event would only have "move towards hero". So when you step on the vision, the trainer would start moving towards you. And will bump into you. And thus, activate the trainers own actions.
Both the trainer and the vision event get turned off when the trainer's switch
This way, you can copy/paste make multiple trainers with minimal changes. (sprite, text, battle, switch, pg2 switch, trainer vision movement target and switch)