How to turn on an event when entering map, off when leave?

Good day.
So I've found out about parallax mapping(I have scripts for them) and weather effects lately, but implementing them into my test game proves weirdly challenging.

Essentially, what you would want with the parallax overlays(a displayed picture) and weather effects is that they only appear on certain maps, so you would create an event on that map to trigger when the player enters the map, to start the weather effect or overlay.

The problem is: How to turn it off?

I've been trying auto run/parallel process with the weather/show picture event and "Erase event", but that doesn't work at all, when I leave the map, the snow is still going, the overlay is still there.
I've tried to use self switches, to turn on when player enters the map and comes to contact with the event, but when the player enters the map they don't trigger events right away, they have to move. so it doesn't work. (it's kinda hard to explain how it works, but it doesn't work, so no point.)
I also tried to put "show picture" in the entering transfer, and "erase picture" on the exiting transfer, but on the exit one, if I put it before the transfer, it disappears too early, if I put it after the transfer, it disappears too late and shows up on the next map.

What I want to avoid at all costs is to use switches, for if I have to create a switch for every rooms weather/overlay, I would have an absurd amount of switches, and the effects would only kick in a few frames after the player enters the map.


At the end of the day, what I am asking is how to turn on an event(immediately) when the player enters the map, and turn off when the player leaves, best not using switches.
(If someone could explain how the hell "erase event" works I would very grateful 🙂 )

Thank you for your time!

(Some reference pictures)
(The parallax mapping looks just fine here, but...)
螢幕擷取畫面 (1229).png


(When I leave the map, its still on! this would be an issue by itself, and an absolute nightmare when multiple parallax maps are present in the game.)
螢幕擷取畫面 (1230).png
If you are doing Parallax Mapping without a script then it will be challenging for sure. There are several scripts for Parallax mapping, so try some of those. I remember reading that one was most compatible with other scripts, but can't remember which one that is.
If you are doing Parallax Mapping without a script then it will be challenging for sure. There are several scripts for Parallax mapping, so try some of those. I remember reading that one was most compatible with other scripts, but can't remember which one that is.
My bad. I forgot to mention I have scripts for it, I am just having trouble turning the event that executes it on and off.
Show Picture and Weather commands don't belong to a map, meaning they don't turn off when you leave a map. They will stay until you issue commands to stop/remove them. So do that on your exit events.
Show Picture and Weather commands don't belong to a map, meaning they don't turn off when you leave a map. They will stay until you issue commands to stop/remove them. So do that on your exit events.
Got it to work! Thanks!

Original thread: https://forums.rpgmakerweb.com/threads/how-to-turn-on-an-event-when-entering-map-off-when-leave.155457/