View Single Post
  #5966    
Old August 3rd, 2011, 05:51 AM
metapod23's Avatar
metapod23
Hardened Trainer
 
Join Date: Mar 2009
Gender: Male
Nature: Timid
Quote:
Originally Posted by HACKERXIDE View Post
My Info
Spoiler:
ROM:Fire Red
ROM TYPE: BPR
ROM LANGUAGE: E
ROM VERSION: 1.0


My Problem

Im trying to make a applymovement/battle script! Just like the ones when Gary battles you. The problem is that my script is not making the person i call upon to move to me and engage in battle! Instead when I walk on the script tile the game freezes. Below is my script.

Spoiler:
'-----------------------
#org 0x726643
checkflag 0x2012
showsprite 0x2
applymovement 0x2 0x872666F
waitmovement 0x0
msgbox 0x872667F '"Hey wait up!"
callstd 0x6
trainerbattle 0x1 0x15F 0x0 0x872668D 0x87266A0 0x87266B2
#raw 02
#raw pointer 0x111111FF
writebytetooffset 0x11 0xE0E0311
setbyte 0xE
writebytetooffset 0x11 0xC2FFFE11

'-----------------------
#org 0x7266B2
msgbox 0x87266CB '"Well I have to go, bye."

'-----------
' Movements
'-----------
#org 0x72666F
#raw 11 'Step Up (Normal)
#raw 11 'Step Up (Normal)
#raw 11 'Step Up (Normal)
#raw 11 'Step Up (Normal)
#raw 11 'Step Up (Normal)
#raw 11 'Step Up (Normal)
#raw 3 'Face Right
#raw E 'Step Left (Slow)
#raw E 'Step Left (Slow)
#raw E 'Step Left (Slow)
#raw E 'Step Left (Slow)
#raw 11 'Step Up (Normal)
#raw 11 'Step Up (Normal)
#raw 11 'Step Up (Normal)
#raw FE 'End of Movements


'---------
' Strings
'---------
#org 0x72667F
= Hey wait up!

#org 0x72668D
= I want to battle!

#org 0x7266A0
= Wow nice battle.

#org 0x7266CB
= Well I have to go, bye.
The reason you're getting writebytetooffset commands at the end of your script is because there is already data at that offset either for another script or something else in the game, and XSE ends up merging the two together.

Basically, it's time to use a new offset, because the script you're writing is too long and there's not enough free space to write it to the current offset. Just use #dynamic and write the first script to a new offset and you should be fine.

Just remember that if you edit a script to make it longer, you might not have the free space needed for the new script. I usually use #remove to erase the old script, then compile the script again with #dynamic and that seems to work well.
__________________