The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Fan Games > Binary ROM Hacking
Reload this Page Other Can't move after level script

Notices
For all updates, view the main page.

Binary ROM Hacking Need a helping hand or just want to talk about binary ROM hacks? Get comments and answers to any ROM Hacking-related problems, questions or thoughts you have here.

Ad Content
Reply
 
Thread Tools
  #1   Link to this post, but load the entire thread.  
Old May 16th, 2014 (9:42 PM).
Danny0317's Avatar
Danny0317 Danny0317 is offline
Fluorite's back, brah
 
Join Date: Jun 2013
Age: 23
Gender: Male
Nature: Hasty
Posts: 1,067
Well, like the title says I cannot move after a level script. Made sure the vars and value are the same in a-map and the script. Also the script runs perfectly, until the end, where I can't move. Help would be appreciated. The script is in the spoiler
Spoiler:
#dynamic 0x800000
#org @start
lock
checkflag 0x207
if 0x1 goto @end
checkflag 0x828
if 0x1 goto @continue
setvar 0x4001 0x0
release
end

#org @end
release
end

#org @continue
applymovement 1 @mom
waitmovement 0x0
msgbox @1 0x6
applymovement 0xFF @exc
waitmovement 0x0
applymovement 1 @momexc
waitmovement 0x0
msgbox @2 0x6
applymovement 0xFF @lel
msgbox @3 0x6
setflag 0x207
setvar 0x4001 0x0
release
end

#org @mom
#raw 0x62
#raw 0x10
#raw 0x10
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x0
#raw 0xFE

#org @1
= [red_fr][player], what do you mean you're\nleaving?\lYou can't just leave me!

#org @exc
#raw 0x65
#raw 0x5
#raw 0x6
#raw 0x7
#raw 0x8
#raw 0x9
#raw 0x5
#raw 0x6
#raw 0x7
#raw 0x8
#raw 0x9
#raw 0x65
#raw 0xFE

#org @momexc
#raw 0x65
#raw 0xFE

#org @2
= [red_fr]I'm sorry, [player].\nI just.. didn't want anything bad\lto happen to you.. But I know this\lmeans a lot to you, so I'll let\lyou go.

#org @lel
#raw 0x0
#raw 0x66
#raw 0x1
#raw 0xFE

#org @3
= [red_fr]Oh, [player].. just don't\nlet anything bad happen to you..\lAnd please just don't go near the\lprison in Filler Citty.\l
__________________
Reply With Quote
  #2   Link to this post, but load the entire thread.  
Old May 17th, 2014 (12:13 AM).
Logan's Avatar
Logan Logan is offline
 
Join Date: Nov 2008
Location: Salisbury, England
Age: 28
Gender: Male
Nature: Sassy
Posts: 10,414
Go into A-Map's header mode and toggle advanced mode (control+H?). There should be a 'map script offset' containing an offset of around 700000. Open that offset in XSE, toggle the level script function and decompile the script and post the remainder here for me to look at. :)
__________________
Reply With Quote
  #3   Link to this post, but load the entire thread.  
Old May 17th, 2014 (6:20 AM).
Danny0317's Avatar
Danny0317 Danny0317 is offline
Fluorite's back, brah
 
Join Date: Jun 2013
Age: 23
Gender: Male
Nature: Hasty
Posts: 1,067
Quote:
Originally Posted by Shinx View Post
Go into A-Map's header mode and toggle advanced mode (control+H?). There should be a 'map script offset' containing an offset of around 700000. Open that offset in XSE, toggle the level script function and decompile the script and post the remainder here for me to look at. :)
Alright, did that, it's in the spoiler.
Spoiler:
'---------------
#org 0x71C13C
#raw 0x2
#raw pointer 0x871C142
#raw 0x0

'---------------
#org 0x71C142
#raw word 0x4001
#raw word 0x0
#raw pointer 0x88088CE
#raw word 0x0

'---------------
#org 0x8088CE
lock
checkflag 0x207
if 0x1 goto 0x88088E9
checkflag 0x828
if 0x1 goto 0x88088EC
setvar 0x4001 0x0
release
end

'---------------
#org 0x8088E9
release
end

'---------------
#org 0x8088EC
applymovement 0x1 0x8808934
waitmovement 0x0
msgbox 0x880893E 0x6 '"[red_fr][player], what do you mean..."
applymovement 0xFF 0x8808981
waitmovement 0x0
applymovement 0x1 0x880898F
waitmovement 0x0
msgbox 0x880A0F4 0x6 '"[red_fr]I'm sorry, [player].\nI ju..."
applymovement 0xFF 0x880A175
msgbox 0x880A17A 0x6 '"[red_fr]Oh, [player].. just don't\..."
setflag 0x207
setvar 0x4001 0x0
release
end


'---------
' Strings
'---------
#org 0x80893E
= [red_fr][player], what do you mean you're\nleaving?\lYou can't just leave me!

#org 0x80A0F4
= [red_fr]I'm sorry, [player].\nI just.. didn't want anything bad\lto happen to you.. But I know this\lmeans a lot to you, so I'll let\lyou go.

#org 0x80A17A
= [red_fr]Oh, [player].. just don't\nlet anything bad happen to you..\lAnd please just don't go near the\lprison in Filler Citty.\l


'-----------
' Movements
'-----------
#org 0x808934
#raw 0x62 'Exclamation Mark (!)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x12 'Step Left (Normal)
#raw 0x12 'Step Left (Normal)
#raw 0x12 'Step Left (Normal)
#raw 0x12 'Step Left (Normal)
#raw 0x0 'Face Down
#raw 0xFE 'End of Movements

#org 0x808981
#raw 0x65 'Double Exclamation Mark (!!)
#raw 0x5 'Face Up (Faster)
#raw 0x6 'Face Left (Faster)
#raw 0x7 'Face Right (Faster)
#raw 0x8 'Step Down (Very Slow)
#raw 0x9 'Step Up (Very Slow)
#raw 0x5 'Face Up (Faster)
#raw 0x6 'Face Left (Faster)
#raw 0x7 'Face Right (Faster)
#raw 0x8 'Step Down (Very Slow)
#raw 0x9 'Step Up (Very Slow)
#raw 0x65 'Double Exclamation Mark (!!)
#raw 0xFE 'End of Movements

#org 0x80898F
#raw 0x65 'Double Exclamation Mark (!!)
#raw 0xFE 'End of Movements

#org 0x80A175
#raw 0x0 'Face Down
#raw 0x66 'Happy (^_^)
#raw 0x1 'Face Up
#raw 0xFE 'End of Movements
__________________
Reply With Quote
  #4   Link to this post, but load the entire thread.  
Old May 17th, 2014 (6:24 AM).
Spherical Ice's Avatar
Spherical Ice Spherical Ice is online now
 
Join Date: Nov 2007
Location: Leicester, UK
Age: 25
Posts: 5,251
You need to set 0x4001 to something other than 0x0, so where there is setvar 0x4001 0x0, replace it with setvar 0x4001 0x1.
__________________
Reply With Quote
  #5   Link to this post, but load the entire thread.  
Old May 17th, 2014 (7:09 AM).
Danny0317's Avatar
Danny0317 Danny0317 is offline
Fluorite's back, brah
 
Join Date: Jun 2013
Age: 23
Gender: Male
Nature: Hasty
Posts: 1,067
Quote:
Originally Posted by Spherical Ice View Post
You need to set 0x4001 to something other than 0x0, so where there is setvar 0x4001 0x0, replace it with setvar 0x4001 0x1.

Well I tried that and the script didn't happen. I setvar 0x4001 0x1 in another script.
__________________
Reply With Quote
  #6   Link to this post, but load the entire thread.  
Old May 17th, 2014 (7:20 AM).
Spherical Ice's Avatar
Spherical Ice Spherical Ice is online now
 
Join Date: Nov 2007
Location: Leicester, UK
Age: 25
Posts: 5,251
What value should 0x4001 have when the level script occurs? The way your script is, it will only activate when 0x4001 is set to 0x0, but then the script sets it to 0x0 as well so it will just loop, or freeze.
__________________
Reply With Quote
  #7   Link to this post, but load the entire thread.  
Old May 17th, 2014 (7:28 AM).
Danny0317's Avatar
Danny0317 Danny0317 is offline
Fluorite's back, brah
 
Join Date: Jun 2013
Age: 23
Gender: Male
Nature: Hasty
Posts: 1,067
Quote:
Originally Posted by Spherical Ice View Post
What value should 0x4001 have when the level script occurs? The way your script is, it will only activate when 0x4001 is set to 0x0, but then the script sets it to 0x0 as well so it will just loop, or freeze.
0x1
I changed everything in this script that had to do with vars to 0x4001 0x1.
__________________
Reply With Quote
  #8   Link to this post, but load the entire thread.  
Old May 17th, 2014 (7:31 AM).
Spherical Ice's Avatar
Spherical Ice Spherical Ice is online now
 
Join Date: Nov 2007
Location: Leicester, UK
Age: 25
Posts: 5,251
If the script is supposed to activate when 0x4001 is equal to 0x1, your script should look like this:

Code:
'---------------
#org 0x71C13C
#raw 0x2
#raw pointer 0x871C142
#raw 0x0

'---------------
#org 0x71C142
#raw word 0x4001
#raw word 0x1
#raw pointer 0x88088CE
#raw word 0x0

'---------------
#org 0x8088CE
lock
checkflag 0x207
if 0x1 goto 0x88088E9
checkflag 0x828
if 0x1 goto 0x88088EC
setvar 0x4001 0x2
release
end

'---------------
#org 0x8088E9
release
end

'---------------
#org 0x8088EC
applymovement 0x1 0x8808934
waitmovement 0x0
msgbox 0x880893E 0x6 '"[red_fr][player], what do you mean..."
applymovement 0xFF 0x8808981
waitmovement 0x0
applymovement 0x1 0x880898F
waitmovement 0x0
msgbox 0x880A0F4 0x6 '"[red_fr]I'm sorry, [player].\nI ju..."
applymovement 0xFF 0x880A175
msgbox 0x880A17A 0x6 '"[red_fr]Oh, [player].. just don't\..."
setflag 0x207
setvar 0x4001 0x2
release
end


'---------
' Strings
'---------
#org 0x80893E
= [red_fr][player], what do you mean you're\nleaving?\lYou can't just leave me!

#org 0x80A0F4
= [red_fr]I'm sorry, [player].\nI just.. didn't want anything bad\lto happen to you.. But I know this\lmeans a lot to you, so I'll let\lyou go.

#org 0x80A17A
= [red_fr]Oh, [player].. just don't\nlet anything bad happen to you..\lAnd please just don't go near the\lprison in Filler Citty.\l


'-----------
' Movements
'-----------
#org 0x808934
#raw 0x62 'Exclamation Mark (!)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x12 'Step Left (Normal)
#raw 0x12 'Step Left (Normal)
#raw 0x12 'Step Left (Normal)
#raw 0x12 'Step Left (Normal)
#raw 0x0 'Face Down
#raw 0xFE 'End of Movements

#org 0x808981
#raw 0x65 'Double Exclamation Mark (!!)
#raw 0x5 'Face Up (Faster)
#raw 0x6 'Face Left (Faster)
#raw 0x7 'Face Right (Faster)
#raw 0x8 'Step Down (Very Slow)
#raw 0x9 'Step Up (Very Slow)
#raw 0x5 'Face Up (Faster)
#raw 0x6 'Face Left (Faster)
#raw 0x7 'Face Right (Faster)
#raw 0x8 'Step Down (Very Slow)
#raw 0x9 'Step Up (Very Slow)
#raw 0x65 'Double Exclamation Mark (!!)
#raw 0xFE 'End of Movements

#org 0x80898F
#raw 0x65 'Double Exclamation Mark (!!)
#raw 0xFE 'End of Movements

#org 0x80A175
#raw 0x0 'Face Down
#raw 0x66 'Happy ()
#raw 0x1 'Face Up
#raw 0xFE 'End of Movements
__________________
Reply With Quote
  #9   Link to this post, but load the entire thread.  
Old May 17th, 2014 (7:37 AM).
Danny0317's Avatar
Danny0317 Danny0317 is offline
Fluorite's back, brah
 
Join Date: Jun 2013
Age: 23
Gender: Male
Nature: Hasty
Posts: 1,067
Quote:
Originally Posted by Spherical Ice View Post
If the script is supposed to activate when 0x4001 is equal to 0x1, your script should look like this:

Code:
'---------------
#org 0x71C13C
#raw 0x2
#raw pointer 0x871C142
#raw 0x0

'---------------
#org 0x71C142
#raw word 0x4001
#raw word 0x1
#raw pointer 0x88088CE
#raw word 0x0

'---------------
#org 0x8088CE
lock
checkflag 0x207
if 0x1 goto 0x88088E9
checkflag 0x828
if 0x1 goto 0x88088EC
setvar 0x4001 0x2
release
end

'---------------
#org 0x8088E9
release
end

'---------------
#org 0x8088EC
applymovement 0x1 0x8808934
waitmovement 0x0
msgbox 0x880893E 0x6 '"[red_fr][player], what do you mean..."
applymovement 0xFF 0x8808981
waitmovement 0x0
applymovement 0x1 0x880898F
waitmovement 0x0
msgbox 0x880A0F4 0x6 '"[red_fr]I'm sorry, [player].\nI ju..."
applymovement 0xFF 0x880A175
msgbox 0x880A17A 0x6 '"[red_fr]Oh, [player].. just don't\..."
setflag 0x207
setvar 0x4001 0x2
release
end


'---------
' Strings
'---------
#org 0x80893E
= [red_fr][player], what do you mean you're\nleaving?\lYou can't just leave me!

#org 0x80A0F4
= [red_fr]I'm sorry, [player].\nI just.. didn't want anything bad\lto happen to you.. But I know this\lmeans a lot to you, so I'll let\lyou go.

#org 0x80A17A
= [red_fr]Oh, [player].. just don't\nlet anything bad happen to you..\lAnd please just don't go near the\lprison in Filler Citty.\l


'-----------
' Movements
'-----------
#org 0x808934
#raw 0x62 'Exclamation Mark (!)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x12 'Step Left (Normal)
#raw 0x12 'Step Left (Normal)
#raw 0x12 'Step Left (Normal)
#raw 0x12 'Step Left (Normal)
#raw 0x0 'Face Down
#raw 0xFE 'End of Movements

#org 0x808981
#raw 0x65 'Double Exclamation Mark (!!)
#raw 0x5 'Face Up (Faster)
#raw 0x6 'Face Left (Faster)
#raw 0x7 'Face Right (Faster)
#raw 0x8 'Step Down (Very Slow)
#raw 0x9 'Step Up (Very Slow)
#raw 0x5 'Face Up (Faster)
#raw 0x6 'Face Left (Faster)
#raw 0x7 'Face Right (Faster)
#raw 0x8 'Step Down (Very Slow)
#raw 0x9 'Step Up (Very Slow)
#raw 0x65 'Double Exclamation Mark (!!)
#raw 0xFE 'End of Movements

#org 0x80898F
#raw 0x65 'Double Exclamation Mark (!!)
#raw 0xFE 'End of Movements

#org 0x80A175
#raw 0x0 'Face Down
#raw 0x66 'Happy ()
#raw 0x1 'Face Up
#raw 0xFE 'End of Movements

I'll try that when I get home, thank you :)
__________________
Reply With Quote
Reply

Quick Reply

Join the conversation!

Create an account to post a reply in this thread, participate in other discussions, and more!

Create a PokéCommunity Account
Ad Content
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 9:12 AM.