Jigglysaint
|
 |
« Reply #1 on: June 29, 2010, 11:51:49 PM » |
|
Okay, 20 XX leads to a script that gets the event based on what dungeon map you are on, and what index. For example, 20 00 in level 1 is used for chests spawned by switches, but in level two, it's the Roc's Feather. Each dungeon has a list of events that are used. It actually doesn't make much sense since why not just have one global script list, but this game has chosen to load via dungeon number. I believe the pointer to the event in bank 0C that deals with level 1's chest switch is at 20C52.
Now 21 xx is used for tile puzzles, and depending on the index, it loads an ASM script that sets the tiles and it's trigger. Note that ASM scripts can incoporate event scripts, and event scripts can point to ASM scripts(but only in bank 15).
Also, F8 09 is used for switches. For the second byte, the lower nybble is used for switch index(0, 1, etc), and bit 7 means the switch is a toggle switch, but the event must be set to aknowlege it's a toggle or else it will just continue to spawn that event.
|