The PokéCommunity Forums

The PokéCommunity Forums (https://www.pokecommunity.com/index.php)
-   Binary ROM Hacking (https://www.pokecommunity.com/forumdisplay.php?f=284)
-   -   Other Can't move after level script (https://www.pokecommunity.com/showthread.php?t=326603)

Danny0317 May 16th, 2014 9:42 PM

Can't move after level script
 
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

Logan May 17th, 2014 12:13 AM

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. :)

Danny0317 May 17th, 2014 6:20 AM

Quote:

Originally Posted by Shinx (Post 8254803)
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

Spherical Ice May 17th, 2014 6:24 AM

You need to set 0x4001 to something other than 0x0, so where there is setvar 0x4001 0x0, replace it with setvar 0x4001 0x1.

Danny0317 May 17th, 2014 7:09 AM

Quote:

Originally Posted by Spherical Ice (Post 8255043)
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.

Spherical Ice May 17th, 2014 7:20 AM

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.

Danny0317 May 17th, 2014 7:28 AM

Quote:

Originally Posted by Spherical Ice (Post 8255100)
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.

Spherical Ice May 17th, 2014 7:31 AM

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



Danny0317 May 17th, 2014 7:37 AM

Quote:

Originally Posted by Spherical Ice (Post 8255115)
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 :)


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


Like our Facebook Page Follow us on Twitter © 2002 - 2018 The PokéCommunity™, pokecommunity.com.
Pokémon characters and images belong to The Pokémon Company International and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company or The Pokémon Company International. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2016 The PokéCommunity / PokéCommunity.com.
PokéCommunity™ is a trademark of The PokéCommunity. All rights reserved. Sponsor advertisements do not imply our endorsement of that product or service. User generated content remains the property of its creator.

Acknowledgements
Use of PokéCommunity Assets
vB Optimise by DragonByte Technologies Ltd © 2023.