Trying to make a multi-map event reset script, need Help!

Update:


So I wrote a script that is called through activating an event, but I am missing something.


But when the event activates I get an error:


Script 'Game_Interpreter' line 1411: NameError occurred
unintialized constant Game_Interpreter::Event


Here is the code I wrote:


$game_self_switches[[7, 4, 'A']] = falseErase Event  #?
$game_self_switches[[7, 8, 'A']] = falseErase Event
$game_self_switches[[7, 9, 'A']] = falseErase Event
$game_self_switches[[7, 10, 'A']] = falseErase Event
$game_self_switches[[7, 11, 'A']] = falseErase Event


I put it directly into the event as above using the insert feature, tab 3, Advanced: Script...


Am I supposed to use the scripts list, should I put it under a category for it to work?


I am trying to test 5 events to start, 4 variable rollers and trackers, and one proper door.


Orig Post:


Ok so some background info:


I haven't ever legit learned how to code. The most complicated system I have used was using the campaign editor from Empire Earth (So basic knowledge of how gates work and how order of operations is very important)


And what I am trying to do is have resettable random maps. Now I already have the random maps part down, and a reliable method of resetting a single door, but the problem is finding a method to reset every single random door on every individual map, all at the same time.


If I use a common event or switch it causes every door to either:


Only reset in the first room, then never again. (Because the switch needs to be turned off to prevent OR)


OR


Forces each door to Randomize indefinitely. I want random maps, but not that random. It needs to randomize and stay permanent until reset.


So what I need from the script I am trying to write:


It checks IF a common switch is on. (Or I could just have it Run the script from within the event I have already set up)


If it is, it then goes through every map, resetting every Event back to it's initial Tab.


It then turns off the common switch. (Unless I use the event to run it manually)


The Script Ends.


So I am wondering if there is a way to have every event referenced at once without having to specify the world ID before each individual event ID.


As in: is it possible to somehow code (Excuse the total lack of actual in-game terms, I am still reading tutorials)


Method MapID 1-all, eventID 1-all,


  Set all to tab ID Initial or 1 (Whichever it is)


End


There are alot of maps and events to reference. Doors and eventually randomized loot spots across multiple maps..


As well how do I find the script ID for an event's specific tab? (Like tab 1,2,3,4 or 5) Is it possible?


I'm still studying all the tutorials I can find, but if anyone had examples I could look at or reference I would really appreciate it.


So TL;DR list of questions:


When referencing Map (Read as World) and Event ID's, can multiple ID's be referenced across multiple maps to effect the events without typing out each one as World ID + Event ID for each individual Event?


Where do I find the ID for an event's individual Tabs (Read as Pages)


And are there any scripts that I could take a look at as examples? Like any that has a function similar to what I am trying for, my searches haven't turned up anything.


And any advice would be appreciated, like where to even start?


Thats all I can think to ask, back to tutorials for now. Thanks foir any advice in advance!
Well it's been a bit (Since I Originally posted), so here's an update (If anyone is reading this forum now that MV is around)


So to start:


class Game_Event
  game_self_switches [7, 4, 'A'] = falseErase Event  
  game_self_switches [7, 8, 'A'] = falseErase Event
  game_self_switches [7, 9, 'A'] = falseErase Event
  game_self_switches [7, 10, 'A'] = falseErase Event
  game_self_switches [7, 11, 'A'] = falseErase Event


Newest script I've written.


Script 'Game_Interpreter' line 1411: SyntaxError occurred


unexpected '=', expecting keyword_end


game_self_switches [7,4, 'A'] = falseErase Event


New Error.


I have looked under the scripts, I have checked THAT line (1411) nothing looks wrong, and it shouldn't be as I haven't edited a single existing line of code (I don't want to destroy everything/anything)


(HUGE question: WHY is it constantly saying something is wrong with THAT line, which is vanilla and unchanged? What does THAT line have to do with my script? How is it even remotely related, and why is it?)


Does anyone know what I am missing? Am I missing a prefix or suffix in my code?


Is it not a Game_Event, or do I have to save it with the 'true' scripts before an event can use it?


I can't fix it if I don't know whats wrong, or even what to look for.


Can anyone give any info on what I am doing wrong? It would be appreciated.

Original thread: https://forums.rpgmakerweb.com/threads/trying-to-make-a-multi-map-event-reset-script-need-help.56080/