View Single Post
Old March 30th, 2012 (10:23 PM). Edited March 30th, 2012 by darkprince909.
darkprince909 darkprince909 is offline
Join Date: May 2008
Posts: 79
Quote originally posted by droomph:
Here's what you could do. Just use setmapfooter instead of setmaptile. Besides, you'll save CPU power if you do that.

However, don't use Special 0xD5 and set your own flags (and so on) and change the setmapfooter argument to whatever map you're using.

So basically you change the map you're entering, and so you just make two maps! Convenience!
So what youre saying is the final script, in essence, would be something like
#org 0x800000
checkflag 0x(flag for the event that destroyed the city)
if 0x1 goto 0x(destroyed city map)
goto 0x(normal city map)

#org 0x(destroyed city map)
setmapfooter 0x(whatever the footer for this map is)

#org 0x(normal city map)
setmapfooter 0x(whatever the footer for this map is)


A few questions about this:

How do I figure out what the footer for the map is (A8, A4 for Shoal Cave for example)? I cant find it in Advancemap, even in the professional header view. I may just not be looking in the right place though.

And when, in the story, I go back in time to before the city is destroyed, I'd just clear the flag so that it loads the normal city map?

The special 0xD5 is a ASM function that checks what time it is and returns a positive or a negative for that specific flag based on what time it is, right? And that's why I wouldn't use either of those?

And this whole thing would work with Fly, so that when you Fly to the map, it would run this script before you see anything, and would thus load the destroyed city before you land, right? In that case, would I need to place a Fly block (where you land) in the destroyed map as well? Or would it take you to the same coordinates as the warp it at on the normal map?
EDIT: I took a look at it in the ROM. It looks like the setmapfooter changes just the tile placements and permissions and loads all the events from the original map? Because all the warps and items and such are on the low tide versions and there's no events whatsoever on the high tide versions. Meaning that everything the NPCs would do in the destroyed city would have to be scripted in the normal city? And this would mean all the Warps, Fly tiles, etc would be loaded from the original map as well?