How do I reset all of the events and switches and variables in a map WITHOUT transfering maps?

Is there a quick, easy way to reset a whole map without transferring the player to another map and back? I am at a loss as to how to perform this. Any help is greatly appreciated.
Because switches and variables are global and not tied to a map, no, unless you have an event on that map that initializes them when the map loads.

$game_map.setup(@map_id)would reload the current map, moving all the events back to where they were previously, while keeping the player in the same spot. This means you will be able to see some events disappear or snap to a different location.
But no, it would not reset variables/switches to what they were when you first entered the map.
So I would have to manually event the switches and variables resetting? Are self-switches global?
no, self switches, as indicated by the name (and that fact that when you use a Control Self Switches command you don't get to choose a map or event) are private to the event.


You would need to have an event set to parallel process on the map you wanted to reset, that would initialise the values of all the switches and variables you want to reset, as well as a Script event command that would loop through every event on the map and turn off all the self switches. You need to do it in a script call because you can't change one event's self switch from another event using event commands.
I Created a random map generater, and what I'm going to do, is devote a entire batch of normal switches to whatever may show up on the maps, and every time I'm go to the next floor, I reset all the switches by the batch all with a single command, so that's what I would do. In your case, you can use any kind of event to just rest such.

It takes some planning ahead, but It's nice, and clean.
You could use Nathaniel B's self switch script to turn on or off multiple self switches with one script call or multiple script calls if you want certain events to say be self switch b and some self switch a depending how you have set your events up

http://forums.rpgmakerweb.com/index.php?/topic/26846-advanced-multiple-event-self-switch-control/

Original thread: https://forums.rpgmakerweb.com/threads/how-do-i-reset-all-of-the-events-and-switches-and-variables-in-a-map-without-transfering-maps.46167/