Go open the base JS files, find the function that processes loading, and add that script call to it...
On another note, why would you want to do it upon loading?
Why not just reset them on map load then? You know like have a parallel process event on the map, make it reset self switches, then erase event so it doesnt run until next time...
Anyway, the base JS files are the files inside the JS folder of your game.. Adding the script call is just that, add that exact line to the appropriate place in the JS file.
Depends on how you set it.. By default, parallel process, run ALWAYS...
If you follow my method and add an erase event at the end, it will only run once every time you go to that map, before anything is shown. It wont run if you save, quit then load that file, unless you edit the game first which will force a map update upon loading.
Do you really need it only during save file loading? and Why?