PDA

View Full Version : Map scripts in FR (not a mere script request)


Teh Baro
September 18th, 2007, 10:16 AM
So, how do I make them work?
I made some research on island 1's pokémon center map script (third pointer in the map header, actually it's some sort of script header) and I got this:
03 SCRIPT-A 05 SCRIPT-B 01 SCRIPT-C 02 STRUCTURE 00
(pairs of byte-pointers, 00 terminated)

script A has the re-spawn command and some movesprites
script B is special 0x182, end
script C is some setmaptiles that depend on var 0x4076

fourth pointer, the structure, looks like this:
0x4076 0 0 SCRIPT-D 0 0

and script D is the stuff with BILL and CELIO, where they give you a meteorite.

What I want in this map is to play a sound and display some text (or just the text and put the sound in it, doesn't matter), so technically in my map the script that does all this stuff is the SCRIPT-D. So, I copied that structure. scripts A, B and C lead to a 0x02 (end) and script D is, currently, this:

#org 0x732c70
jingle
msgbbox 0x732c00
callstd 0x6
#raw 0x6b
end

When I enter the map, nothing happens (while I was messing with all this, trying the map resulted in a crash, BTW)

I know I may get no answer, but I'm stuck... any ideas?




EDIT: Okay I ****ed something up while copying the stuff manually and it WORKS. Now the problem is that it repeats to insanity, but that's something I've gotta check (I think it has to do with the flag in the weird structure).

When I have the time, I'll write a tutorial for all this.
You may either delete this thread or comment, ask stuff, etc.

OMNIPOTENT
September 19th, 2007, 01:04 PM
happy it works... but what is "it"?? what you were tryin to do? ^^''

Teh Baro
September 21st, 2007, 01:27 AM
happy it works... but what is "it"?? what you were tryin to do? ^^''

making events happen when you enter a map. Actually I messed up copying an offset and forgot the 08 and that was why it hadn't worked. I'll make some sort of tutorial on this.

OMNIPOTENT
September 21st, 2007, 10:30 AM
maybe understood: when you enter a map no matter from where? that would be nice, if it needs only a script (no a circle of events around the location as i'd do if i need it ^^)

Teh Baro
September 21st, 2007, 12:57 PM
maybe understood: when you enter a map no matter from where? that would be nice, if it needs only a script (no a circle of events around the location as i'd do if i need it ^^)
Exactly. Also if you get out of a building through a warp. Remember for example in old Gold when prof. elm calls you when you get out of the pokemon center in violet city.