How to end event?

1587471525664.png
well,I did like this it look like Erase Event of End event can't help anything... what do I do wrong? please tell me
if its have switches/selfswitches, put one = ON, on the 2nd page, turn that switch ON
and leave it blank or put erase event on that one.

I dont know if rpg 2k3, xp, vx, mv are the same with those function though.
but switches should be there I think.
@KoMo_Riz is it a common event like last time? if it is, erase event does nothing. Use an event on the map for that.
If it is a map event... you have a transfer. if tht transfer is to another map, it will also do nothing, because erase event is undone when you exit the map and enter again later. use a new page with a switch, and turn the switch on at the end of the event before "erase event", if you even use it, though, else it won't be done because the event was erased)

In the future for things like this better put the whole window instead of just the event text like you did. Because things like if it is common or map event and the settings on the event are important.
@KoMo_Riz
the main cause for the questions and confusion above is that your screenshot does not show the entire event, it only shows the content of the event. But the properties are as important as the content, and if you had shown the entire event window including the event properties, we would have seen what type of event it is and why the erase event doesn't work as you intended it to work.
Even without the issue mentioned by Andar, I can see another one. Exit Event Processing is almost certainly not what you want to use. It completely stops the current event, meaning the erase event will never actually trigger.
@KoMo_Riz
the main cause for the questions and confusion above is that your screenshot does not show the entire event, it only shows the content of the event. But the properties are as important as the content, and if you had shown the entire event window including the event properties, we would have seen what type of event it is and why the erase event doesn't work as you intended it to work.
1587525803656.png
i'm sorry! this is full of it
as told above, the "end event processing" is the reason why the "erase event" is skipped.

There are three different methods of ending events depending on what exactly you want to do, and they should not be mixed.

"end event processing" means "skip to the end of the event and ignore all commands below this one". It is used if you have a branching event where different things can happen, and you want the rest of the other commands ignored after one of the early branches has been selected.
As a result the event can be repeated many times with different effects, it will never vanish.

"erase event" means "delete event from memory only" - and it also means that the event is still part of the map and will be reloaded if the player leaves the map and returns.
This is often used for map initialisations, an event that does something on the map and then is deleted until the player returns to the map when that initialization is needed again.

"Switching off" is permanent and the only way to end autoruns or parallal processes that are supposed to be run only once. You basically have a second page on the event conditioned to a switch, and when the switch is turned on on the first page that page gets deactivated and the second page will become active (which may or may not contain other commands or a sprite).
Search the forum for tutorials on eventing and on page priority for details.
Uh, didn't know about Exit Event Processing myself. Thanks!

Original thread: https://forums.rpgmakerweb.com/threads/how-to-end-event.120477/