View Single Post
  #7421    
Old November 7th, 2012, 04:25 PM
papayaperson's Avatar
papayaperson
Intermediate Hackker
 
Join Date: Dec 2011
Location: United States
Age: 16
Gender: Male
Nature: Relaxed
Game: FireRed
Type: BPR

I've been having some problems with my scripts, and there is one that I haven't been able to fix. Here's the script in the spoiler:
Spoiler:
#org 0x8165465
'-----------------------------------
setworldmapflag 0x890
movesprite2 0x3 0x1A 0xB
checkflag 0x291
if true jump 0x87402CA ' Flag is set
checkflag 0x258
if true jump 0x874026F ' Flag is set
end

#org 0x87402CA
'-----------------------------------
end

#org 0x874026F
'-----------------------------------
lockall
movesprite 0x3 0xB 0xF
applymovement 0x3 0x81654A2 ' walk_up walk_up walk...
pauseevent 0x0
msgbox 0x81654BD ' Oak: Hello! You look...
callstd MSG_NOCLOSE ' Non-closing message
closemsg
setflag 0x291
applymovement 0x3 0x81654A8 ' walk_up walk_up walk...
applymovement PLAYER 0x87400F7 ' walk_right raw_FD wa...
pauseevent 0x0
msgbox 0x87401F4 ' \v\h01, I would like...
callstd MSG_NOCLOSE ' Non-closing message
closemsg
applymovement 0x3 0x87400F9 ' walk_right walk_righ...
pauseevent 0x0
disappear 0x3
releaseall
end


#org 0x81654BD
= Oak: Hello! You look like\nyou have great potential!\pFor what you ask?\lCome to my lab so that\nI can show you!

#org 0x87401F4
= \v\h01, I would like\nyou to\ntake a journey for me,\lall the way across Pykao.\pPlease tell your mother,\nand then come to my lab.

#org 0x81654A2
M walk_up walk_up walk_up walk_up walk_up walk_up walk_up walk_up walk_left walk_left end

#org 0x81654A8
M walk_up walk_up walk_left walk_left end

#org 0x87400F7
M walk_right raw_FD walk_right walk_right walk_up walk_up walk_up walk_up walk_up walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right end

#org 0x87400F9
M walk_right walk_right walk_up walk_up walk_up walk_up walk_up walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right end

That's my script for entering into the first town, type 03 On entering map/not on menu close. I'm not sure if the problem is that one or this one:
Spoiler:
#org 0x8168DB9
'-----------------------------------
lock
faceplayer
checkflag 0x258
if true jump 0x81A7AE0 ' Flag is set
msgbox 0x818DBDD ' Roberta: Oh, hey \v\...
callstd MSG_NOCLOSE ' Non-closing message
closemsg
setflag 0x258
release
end

#org 0x81A7AE0
'-----------------------------------
msgbox 0x818DA16 ' Roberta: I'm not sur...
callstd MSG_NOCLOSE ' Non-closing message
closemsg
release
end


#org 0x818DBDD
= Roberta: Oh, hey \v\h01.\pWhatcha doing here?\p...\pOh, sorry.\n\v\h06 left a while ago.

#org 0x818DA16
= Roberta: I'm not sure where \v\h06\nwent, but he was excited!


Okay here's what happens:
The 'on entering map' script is supposed to make prof. oak walk to the player, take him halfway to his lab, tell the player about the journey and ask him to tell his mother, and then oak goes to his lab (and his sprite disappears), however this only happens after flag 0x258 is set, which is set when you talk to Roberta (second script, she is inside). But when I leave Roberta's house, the screen just turns black. The music continues normally, but the screen is completely black, making it unplayable. Any ideas as to what the problem is? Not totally sure if it's the scripts or something wrong with my rom, but this doesnt happen before the flag 0x258 is set. I've tried it with different flags and it still won't work. Does anyone know how to fix this?