how to stretch event?

I have a passage that triggers an event, and I want to stretch it thru the entire passage tiles. How do I do this?
you don't.

you copy the event to every tile in the passage

Theoretically you could check for coordinates but that would require a parallel process causing additional lag and a few other problems, copying the event is easier.
I tried doing that, but I want them to eras after. I tried variables, but they didn't work. Solution to that?
you need to switch them off with a general switch that is the same for every event
This is my code
BERMUDA - RPG Maker VX 10_17_2023 6_27_42 AM.png

It dosen't work. Why? i tried switch the self-switches to normal switches, didn't work either
If you've done it like that for every event (and once we get that established we can go into how you can improve it), only the event that got triggered will be erased. That will still happen the same way for every other event along the path, because there is nothing connecting them.
How do I connect them?
How do I connect them?
Oops didn't mean to post that twice
Instead of using a self switch (which is unique for each event), use a normal switch (which is global and affects all events).

Each event needs to have a second page with nothing in it. This second page needs to have Condition --> Switch checkmarked and you'll want to use the switch you used above.
@LostAndFoundRPG
It would also help you to go through some tutorials for learning the basics of eventing.

"Switching off an event" is a short way to describe changing the event to a different page, and is NOT the same as erasing an event.
Basically what you want to do can't be done with erase event - that is why I used the common term for what you really need to do, switching all events to a different and empty page so that they'll do nothing from then on.

And the other basic you're missing is the difference between self-switches and regular switches.
Self-switches are limited to the event itself (that's where the name comes from) and cannot affect a different event. That is why anything that is supposed to connect different events has to use a single regular switch but never self-switches.
This was the solution. Thank u so much!

Original thread: https://forums.rpgmakerweb.com/threads/how-to-stretch-event.162063/