How to trigger an event when player enter the region? RMMZ

I want to trigger the event when the player enters this region, how do I do that?
1677356773007.png
either with a plugin or a parallel process for checking that.

however that depends partially on what that event is supposed to do - so what exactly do yopu want to trigger?
Here is a link to a recent post about how to make an event chase the player. One solution without a plug-in (as @Andar mentioned) is to use a parallel event.

I posted a video that shows two different events being triggered by the player.

If that is something like what you are looking for, I would be happy to post the screenshots of the events here.

If you're open to a plugin solution, then VisuStella Events and Movement Core can do what you're asking.
I am trying to make a pop-up chat when the player get near the npc. I am using Visustella's gab window to do that. Right now, I need to set the area region for where the player can see the pop-up chat from npc.

I want to do when the player step in that area region the pop-up chat will show, and when player leave the area region the chat will close.
so basically the chase function tips are useless.

the region ID variant calling common events might work, but you'll need two events and IDs for entering and leaving.

If this is on a simple map, then the parallel priocess is actually the easiest way, repeating the gap window as long as the player is near. And you can define near either by region ID or by coordinate mathematics (control variable).

The reason why I mention "simple map" is that each such parallel will use up computer resources - there is no problem having one or two of them with a wait(5) on a map, but if the map has many more cases it'll need a mor complex solution.

the simple solution is basically a map event on parallel checking the player coordinates against whatever you choose as a definition, and then displaying that gap window followed by a wait that is less than the window stays but at least 5 frames or so.
so basically the chase function tips are useless.

the region ID variant calling common events might work, but you'll need two events and IDs for entering and leaving.

If this is on a simple map, then the parallel priocess is actually the easiest way, repeating the gap window as long as the player is near. And you can define near either by region ID or by coordinate mathematics (control variable).

The reason why I mention "simple map" is that each such parallel will use up computer resources - there is no problem having one or two of them with a wait(5) on a map, but if the map has many more cases it'll need a mor complex solution.

the simple solution is basically a map event on parallel checking the player coordinates against whatever you choose as a definition, and then displaying that gap window followed by a wait that is less than the window stays but at least 5 frames or so.
So, I make a command event that set the control variable for player x and y, then I set get the location for the area code. Every time player enters the region code the event will trigger.

But right now, I don't know how to close the event. The event message is keep repeating. If I set a switch to close the event. The event can't trigger the next time player enter the region. How do I do that?
屏幕截图 2023-02-26 145211.png
if done correctly you should never need to close the event.

if it always displays the message, then something is wrong withe the common event for player region.
that should only be three event commands, why do you use a common event at all here?
Please post a screenshot of that common event or replace it with the commands themselves and then show the event with the commands to determine the region.

additionally, you are missing the wait command I mentioned. That command is really important for parallel processes, it should be 5 or 10 frames in such a case.
if done correctly you should never need to close the event.

if it always displays the message, then something is wrong withe the common event for player region.
that should only be three event commands, why do you use a common event at all here?
Please post a screenshot of that common event or replace it with the commands themselves and then show the event with the commands to determine the region.

additionally, you are missing the wait command I mentioned. That command is really important for parallel processes, it should be 5 or 10 frames in such a case.
I use the common event because I want to set many other chats that are the same as this on the map. I found out that the event is repeated because I walk through multiple region 1 tiles. For each region 1 tile the player steps in, the event will repeat another time after the event before is closed. I need to find a way that when the player leaves region 1 tile, the event can stop.
屏幕截图 2023-02-26 152725.png
for that, you'll have to check the instructions on the plugin as to how the gab window closes

Original thread: https://forums.rpgmakerweb.com/threads/how-to-trigger-an-event-when-player-enter-the-region-rmmz.155307/