Delete multiple events simultaneously

Good morning everyone, I hope I posted in the right section....
I need to create multiple events that ( which are triggered on passing) to trigger a sequence, at the end of the sequence I want all the events I placed in the map to disappear.

I don't know if there is a better way to make a sequence trigger by delimiting an area to my character, but I am attaching the sequence I wrote in hope that you can advise me how to proceed.
the best way or cleanest I know is by a global switch that turned on when something
is cleared, turn that on and all pages that share this switch will be ON as well.

so that is the best way.

if you use self switches like D, or higher (by plugin), you can set those on
the MapID, eventID and "Letter" to be ON (3 scriptcalls) each of their own.

but that is entirely up to you, how you deal with it.

My personal approach is a global switch, because its faster.
Thanks for the quick reply Dragon, I admit I am not very experienced in creating events, but I feel like empowering myself!!!

What do you recommend then?
Make a common event, which upon activation of a specific switch clears the selected events?

That would be a nice solution that will undoubtedly make programming easier in the future...
Could you show me an example, how should I do it in your opinion?
It works!!!
Thanks for the explanation, do you think I need to do anything else?
1 - There's no reason to make a separate common event for this. Just paste your Control Switch event command into event 11.

2 - If you did need to use a common event, it should not be a parallel event that uses another switch just to activate it. You would leave the common event with Trigger: none, and use the Common Event command to call it one time.

3 - Any time you do need to use a parallel event, make sure you're controlling it. You should almost never have a parallel event without a Wait command in it, and right now you're not turning the event off after you use it. So you're going to be turning that switch on 60 times a second for the rest of your game.

4 - Why is your blank page on event 11 set to Autorun? That's going to lock the player from being able to do anything as it tries to run 60 times per second for no reason. It should be Player Touch.

5 - Why do you have a Delete Event command on event 11? That's why you're turning on the switch, to make it go to a blank page. And why are you trying to control a switch after you've deleted the event? I'm surprised that's even happening.

I suggest you read through the instructions on events as well as look up some tutorials for common events and events on YouTube - there are a bunch of them available. You seem to have an incomplete understanding of what the various settings do, in a way that could harm your game.
The problem is not deleting event 11, but 7 other events that have to disappear from the map when the character finishes the command of event 12...

I have tried putting a condition in the other events "If control switch X is active--clear event, but it does not work since the winds in question are activated by passing over them.

Could you please rephrase then a solution, yes you are right no need to clear the event if I send it on a blank page...I really messed up and I will go and study the events and switches better.
The problem is not deleting event 11, but 7 other events that have to disappear from the map when the character finishes the command of event 12...

I have tried putting a condition in the other events "If control switch X is active--clear event, but it does not work since the winds in question are activated by passing over them.

Could you please rephrase then a solution, yes you are right no need to clear the event if I send it on a blank page...I really messed up and I will go and study the events and switches better.
What do you mean by disappear from the map? Erase them or flip all their self switches?
I have tried putting a condition in the other events "If control switch X is active--clear event, but it does not work since the winds in question are activated by passing over them.
That's all unnecessary. Just do what you already have on Event 11 - make a second page that's blank. Leave it as trigger: Action Button. No event commands at all.

Give them the condition of Switch 63. At the bottom of Event 11, turn on Switch 63. All of the events with that condition on a page will become invisible.

Delete your common event. Delete the Erase Event command.

The only time you use Erase Event is if it is supposed to go away just for now, but it reappears/reactivates when you come back to the map.
Delete several events.
Basically I have delineated a precise area in which the character begins a dialog, but since I don't know which way it gets there I have arranged the same event to circumscribe the area in which the dialog will appear ( actionable events when you walk on it).
Some (parallel) events clear without any problems, as I have inserted a condition "if switch x is ON - Clear event.

But the other events that are triggered by walking on them do not clear, adding the same condition "if switch x is ON - Clear event" ( as I believe they are always triggered only when the character walks on them)
But the other events that are triggered by walking on them do not clear, adding the same condition "if switch x is ON - Clear event" ( as I believe they are always triggered only when the character walks on them)
Did you read my above post? If you want an event to be inactive, you simply need it empty with the condition of a switch - you should not be trying to do any "clear event" anything.

Screenshot 2023-05-08 114249.png
Thank you Turan, Effectively it works!!!
I was complicating my life, yes I am going to review a little bit on Youtube actually, I still don't have a clear view of the events and switches!!!

Thank you all for your help.
@Dafox keep in mind that "Erase Event" is kinda useless in most situation.

the most effective way for "Erase Event" = something that need a parallel event,
and everytime you enter that map, that event is run once as it Erase itself, but
run again when you re-enter that map (from map to map or from a house to that map
or by teleporting there).

if you keep it running without waiting like ATT_Turan said, the game can lag,
specially if you run a couple of them, so you need to think before and when to
use parallel event without a wait.

there are some tutorials on how to use it effectively, if you do not, you just make
alot of errors or the game could crash by incorrectly use of the event.

try the inbuilt tutorial if you didn't use it yet, search tutorials on how to activate
events and de-activate by a global switch, there is alot of nice tutorials that can
help you improve.

good luck on your game 🙂
@Dafox keep in mind that "Erase Event" is kinda useless in most situation.

the most effective way for "Erase Event" = something that need a parallel event,
and everytime you enter that map, that event is run once as it Erase itself, but
run again when you re-enter that map (from map to map or from a house to that map
or by teleporting there).
Erase events is if you want regenerating map clutter like Zelda where all the pots and bushes you destroyed are back when you leave the area and come back.
Erase events is if you want regenerating map clutter
That's a good use. I use it to set coordinates for my town portal/recall/escape spell, takes you back to the start of the dungeon or to the previous town.

But it's not a part of the solution for cutscene events 😉

Original thread: https://forums.rpgmakerweb.com/threads/delete-multiple-events-simultaneously.157335/