Turn off switches then erase event?

Guys what am I doing wrong?
AKgvJib.png

Page 1 is the battle initiation for the Slime. When the player wins, the event turns into a Pick Up Item.

Page 2,3, and 4 is the possible items you can get depending on the difficulty.

A switch is turned on for one of these pages, again depending on what difficulty the quest is in.

Now, when you collect the item, the page activates switch D, leading to page 5.

Switch 5 is what makes the enemy turn from an item, back to an item after the item was collected. It not only erases the event, but also turns switch D and any other switch that happened to be on. An event forcefully turns off these switches, too at the end of the quest, just incase the player never picked up the item.

Now, why doesn't the enemy on page 1 respawn when I return to the level?
You have the erase event at the top, try moving it to the bottom of the list, saving, and seeing if that works.

It also seems to be a non-auto run event.....but that's probably not relevant in this case.
It also seems to be a non-auto run event.....but that's probably not relevant in this case.

Actually that's COMPLETELY relevant in this case. Because the event page is set Below Players and to trigger on Action Button, the event page can never run. The event trigger for this page needs to be set to Autorun. (Good catch, JayJay, I did not notice that at first.)
Actually that's COMPLETELY relevant in this case. Because the event page is set Below Players and to trigger on Action Button, the event page can never run. The event trigger for this page needs to be set to Autorun. (Good catch, JayJay, I did not notice that at first.)

Aha!

Because it was an erase event, event, I assumed player touch or even action button would suffice.

But I've never needed to erase event, only do a crap ton of edits.

Thanks for the info I never knew I needed.
The event page needs to be set to parallel process, not autorun. In this case it won't make much difference, but only one autorun event can run on the map at a time, and if you have several, you will find the player cannot move while they're running. If you had quite a few more commands in there, your game would freeze while they were running.

Why do you have all that on a new page conditioned by switch D? Why not just put all the commands on the page where you're turning switch D on, instead of turning switch D on? Assuming that gets run correctly, you don't need to worry about parallel process or autorun triggers at all.

Original thread: https://forums.rpgmakerweb.com/threads/turn-off-switches-then-erase-event.88512/