How do I run an event each time I enter a map area?

I have an event I want to run each time I enter a map. Let's just say it starts raining, tints the screen, and turns off background music. I can do this once with an autorun event, and after it has completed the actions I set the self-switch to ON so it doesn't run again continuously.

However, this doesn't reset when I re-enter the map, and I want it to trigger it again every time. This seems like it should be easy, but I haven't found a solution yet. Help would be appreciated.
I have an event I want to run each time I enter a map. Let's just say it starts raining, tints the screen, and turns off background music. I can do this once with an autorun event, and after it has completed the actions I set the self-switch to ON so it doesn't run again continuously.

However, this doesn't reset when I re-enter the map, and I want it to trigger it again every time. This seems like it should be easy, but I haven't found a solution yet. Help would be appreciated.
Instead of using a selfswitch, which is persistent data, you want to use "Erase event" at the end of the event.

This will prevent the event from running again while you are on the map, but will run again when you enter the map.

There are other methods to achieve this, such as using a global variable (PlayerOnMapX=> true or false), or even a custom plugin designed specifically for this, but the erase event is an easy fix that should fit most scenario.
Instead of using a selfswitch, which is persistent data, you want to use "Erase event" at the end of the event.

This will prevent the event from running again while you are on the map, but will run again when you enter the map.

There are other methods to achieve this, such as using a global variable (PlayerOnMapX=> true or false), or even a custom plugin designed specifically for this, but the erase event is an easy fix that should fit most scenario.
Thanks! I'd assumed Erase Event was globally destructive. Good to know there was a simple and elegant solution

Original thread: https://forums.rpgmakerweb.com/threads/how-do-i-run-an-event-each-time-i-enter-a-map-area.173805/