# v17Event triggering problems

This thread pertains to v17 of Pokémon Essentials.

#### Vixiria

##### Rookie
Member
I'm attempting to script an event that plays immediately the first time the PC enters an area. The problem is that there are two possible locations for the PC to appear when they enter the area and each route causes the NPCs and PC to follow different movement routes to complete the event properly so I have created two separate events for each possible move route.
The thing is that I am having trouble with
1. Getting the right event to trigger at the location the PC enters the area
2. Making sure the events don't play over each other
3. Making sure the events don't trigger again.
I've used self switches so once an event plays it will stop playing but I do need help stopping the event that wasn't played from triggering itself.
Any advice would be useful, preferably with images as I have trouble putting text to a visual medium.

Solution
You should use a "player touch" trigger here. That way, the correct event will play when the player steps on it and, addressing your second point, the different events you have won't play at the same time. For your third point, it's up to you how you want to do this. You can activate a global switch after the event plays for the first time. Then, in the event that didn't play, have it "turn off" by doing the same thing you would do with a self-switch - new blank page with the switch selected under "Conditions" in the top left of the event window. Alternatively, you can use the script command pbSetSelfSwitch from the first event to activate the second event's self-switch, but that might be more technical.

I haven't given...

#### ThatWelshOne_

##### Eevee User
Member
You should use a "player touch" trigger here. That way, the correct event will play when the player steps on it and, addressing your second point, the different events you have won't play at the same time. For your third point, it's up to you how you want to do this. You can activate a global switch after the event plays for the first time. Then, in the event that didn't play, have it "turn off" by doing the same thing you would do with a self-switch - new blank page with the switch selected under "Conditions" in the top left of the event window. Alternatively, you can use the script command pbSetSelfSwitch from the first event to activate the second event's self-switch, but that might be more technical.

I haven't given any images like you requested, so just let me know if those would still be useful for you.

#### Vixiria

##### Rookie
Member
You should use a "player touch" trigger here. That way, the correct event will play when the player steps on it and, addressing your second point, the different events you have won't play at the same time. For your third point, it's up to you how you want to do this. You can activate a global switch after the event plays for the first time. Then, in the event that didn't play, have it "turn off" by doing the same thing you would do with a self-switch - new blank page with the switch selected under "Conditions" in the top left of the event window. Alternatively, you can use the script command pbSetSelfSwitch from the first event to activate the second event's self-switch, but that might be more technical.

I haven't given any images like you requested, so just let me know if those would still be useful for you.
Thank you! This was very helpful. I had to reorganize some things to get them to work properly but it worked out in the end.