x Necromorph x
Super Saiyan 4
- 295
- Posts
- 14
- Years
- Kanto
- Seen Jul 28, 2013
How do I make 2 level scripts on one map work? The first one I have works, but the second one wont activate.
How do I make 2 level scripts on one map work? The first one I have works, but the second one wont activate.
AdvanceMap will only allow one level script of each type but there is a way to have two or more. However, you won't be able to access any of them except the first one via AdvanceMap. This is why you can't simply open up most of the level scripts in the player's house in R/S/E.
Open up AdvanceMap and go the map that you want to add the two level scripts two. Go to the "Header" tab and switch to "Professional Header View" (Control + H). Copy the address in the "Map Script offset" field. Now open up your hex editor and navigate to the address that was in the "Map Script offset" field. You should see some data formatted like this:
[Level script type (byte)] [Pointer (word)]
Find the pointer after the '0x02' as that's most likely the type of level script that you want two of. If not, then choose the appropriate one. Next, go to the address that the pointer points to. You'll see some data like this:
[Variable (halfword)] [Value (halfword)] [Script address (word)] ...
For example, for the male player's house in Emerald, I found this:
924003003C781F08
...which, when formatted correctly, looks like this:
0x4092 0x0003 0x081F783C
So that would mean that if the variable 0x4092 contains 0x0003 when the map is loaded, the script at 0x081F783C will be run. To add more than one, just add another string of 8 bytes with the variable, value, and script address. For example, in that same house there are also two other scripts that will run if 0x4092 is 0x0005 and 0x0006 respectively, not to mention a couple others for other situations. Put a '0x00' afterwards which, I think, ends the table. Hope that helps!
in fr/lg, how will i create a rival battle like, he will walk to you then he will battle then after the battle he will say something and then he will just walk away? help pls! =))
I really need help.
I believe in Jesus Christ my Savior. If you do too, and aren't scared to admit it, then copy and paste this in your signature.
in fr/lg, how will i create a rival battle like, he will walk to you then he will battle then after the battle he will say something and then he will just walk away? help pls! =))
I really need help.
I believe in Jesus Christ my Savior. If you do too, and aren't scared to admit it, then copy and paste this in your signature.
WHAT'S THE PROBLEM IN THIS SCRIPT??
THIS IS A RIVAL SCRIPT..
AND ALSO POKESCRIPT..
HELP APPRECIATED!!
#ORG $begin
jingle
checkflag 0x200
if B_true goto $done
applymovement 0x04 $rivalwalk
pausemove 0
message $rivaltalk
$momtalk 1=Let's battle!
boxset 6
trainerbattle 1 0x003
applymovement 0x04 $rivalwalkback
pausemove 0
setflag 0x200
removesprite 4
release
end
#org $done
release
end
#org $rivalwalk
$momwalk 1 ; 0x10 0x10 0x10 0x13 0x13 0x13 0xFE
#org $rivalwalkback
$momwalkback 1 ; 0x12 0x12 0x12 0x11 0x11 0x11 0xFE
If its a script tile, why do you have a setvar?
Because that's how you prevent a script from being triggered more than once.
Why wouldnt you use a flag...
checkflag checks to see if it has happened and setflag makes it not happen again