• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

[Script] Help with a 99% working script

157
Posts
7
Years
  • Age 26
  • Seen Nov 19, 2023
Been working on this script for a while now and it's so close to working. It compiles just fine and everything works as intended except for the fact that the applymovement command labelled @mv5 won't trigger no matter what I do. I'd really appreciate some help or guidance with this one, been stuck with this issue for way too long.
Code:
#freespace 0xFF
#dynamic 0x9C0B20

#org @start
lockall
checkflag 0x94A
if 0x1 goto @done
setvar 0x8004 0x0
special2 0x8000 0x149
compare 0x8000 0x196
if 0x1 goto @go
msgbox @1 MSG_NORMAL
release
end

#org @done
msgbox @3 MSG_NORMAL
release
end

#org @go
msgbox @2 MSG_NORMAL
applymovement MOVE_PLAYER @mv1
checksound
sound 0x15
checksound
waitmovement 0x0
msgbox @4 MSG_NORMAL
fadescreen 0x1
applymovement MOVE_PLAYER @mv6
waitmovement 0x0
showsprite 0x3
clearflag 0x4B4
sound 0x0F
pause 0x20
fadescreen 0x0
cry 0x196 0x0
waitcry
msgbox @newmsg MSG_NORMAL
sound 0xD5
pause 0x40
sound 0x67
pause 0x10
fadescreen 0x1
special 0x116
hidesprite 0x01
setflag 0x94B
applymovement MOVE_CAMERA @mv2
waitmovement 0x7F
fadescreen 0x0
fadescreen 0x3
playsong 0x22B 0x0
showsprite 0x01
clearflag 0x94B
fadescreen 0x2
pause 0x55
sound 0x2B
pause 0x30
sound 0x14
setmaptile 0xB 0x7 0x384 0x0
setmaptile 0xB 0x8 0x38C 0x0
setmaptile 0xC 0x7 0x385 0x0
setmaptile 0xC 0x8 0x38D 0x0
special 0x91
pause 0x40
cry 0x19A 0x0
waitcry
applymovement 0x1 @mv3
waitmovement 0x0
fadescreen 0x1
applymovement MOVE_CAMERA @mv4
waitmovement 0x7F
fadescreen 0x0
msgbox @7 MSG_NORMAL
applymovement 0x1 @mv5
waitmovement 0x0
cry 0x19A 0x0
msgbox @5 MSG_NORMAL '"Deoxys: Ashaaa!!"
waitcry
setwildbattle 0x19A 0x50 0x0
special 0x139
playsong 0x227 0x0
waitstate
fadescreen 0x1
hidesprite 0x1
hidesprite 0x3
special 0x117
fadescreen 0x0
setflag 0x94A
setflag 0x94B
setflag 0x4B4
release
end




#org @1
= The Meteorite appears to be emitting\na strange aura.

#org @2
= The Meteorite appears to be emitting\na strange aura.

#org @3
= The Meteorite appears to have\nstabilized[.]

#org @4
= What's this?\pRayquaza's Pokéball is shaking\nuncontrollably!

#org @5
= Deoxys: Ashaaa!!

#org @newmsg
= It seems Rayquaza senses danger\nnearby....

#org @7
= Something appears to be approaching\nfrom outside the atmosphere!

#org @mv1
#raw 0x56 'Exclamation Mark (!)
#raw 0xFE 'End of Movements

#org @mv2
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0xFE 'End of Movements

#org @mv3
#raw 0x4 'Step Down (Slow)
#raw 0x4 'Step Down (Slow)
#raw 0x4 'Step Down (Slow)
#raw 0x4 'Step Down (Slow)
#raw 0x4 'Step Down (Slow)
#raw 0x4 'Step Down (Slow)
#raw 0x4 'Step Down (Slow)
#raw 0x4 'Step Down (Slow)
#raw 0x4 'Step Down (Slow)
#raw 0x4 'Step Down (Slow)
#raw 0x4 'Step Down (Slow)
#raw 0x4 'Step Down (Slow)
#raw 0x4 'Step Down (Slow)
#raw 0x4 'Step Down (Slow)
#raw 0x4 'Step Down (Slow)
#raw 0xFE 'End of Movements

#org @mv4
#raw 0x08
#raw 0x08
#raw 0x08
#raw 0x08
#raw 0x08
#raw 0x08
#raw 0x08
#raw 0x08
#raw 0x08
#raw 0x08
#raw 0x08
#raw 0x08
#raw 0x08
#raw 0x08
#raw 0x08
#raw 0x08
#raw 0x08
#raw 0x08
#raw 0x08
#raw 0x08
#raw 0x08
#raw 0xFE 'End of Movements

#org @mv5
#raw 0x4 'Step Down (Slow)
#raw 0x4 'Step Down (Slow)
#raw 0x4 'Step Down (Slow)
#raw 0x4 'Step Down (Slow)
#raw 0x4 'Step Down (Slow)
#raw 0xFE 'End of Movements

#org @mv6
#raw 0x40 'mov40
#raw 0x29
#raw 0xFE 'End of Movements
 
760
Posts
15
Years
  • Seen today
Been working on this script for a while now and it's so close to working. It compiles just fine and everything works as intended except for the fact that the applymovement command labelled @mv5 won't trigger no matter what I do. I'd really appreciate some help or guidance with this one, been stuck with this issue for way too long.
Code:
#freespace 0xFF
#dynamic 0x9C0B20

#org @start
lockall
checkflag 0x94A
if 0x1 goto @done
setvar 0x8004 0x0
special2 0x8000 0x149
compare 0x8000 0x196
if 0x1 goto @go
msgbox @1 MSG_NORMAL
release
end

#org @done
msgbox @3 MSG_NORMAL
release
end

#org @go
msgbox @2 MSG_NORMAL
applymovement MOVE_PLAYER @mv1
checksound
sound 0x15
checksound
waitmovement 0x0
msgbox @4 MSG_NORMAL
fadescreen 0x1
applymovement MOVE_PLAYER @mv6
waitmovement 0x0
showsprite 0x3
clearflag 0x4B4
sound 0x0F
pause 0x20
fadescreen 0x0
cry 0x196 0x0
waitcry
msgbox @newmsg MSG_NORMAL
sound 0xD5
pause 0x40
sound 0x67
pause 0x10
fadescreen 0x1
special 0x116
hidesprite 0x01
setflag 0x94B
applymovement MOVE_CAMERA @mv2
waitmovement 0x7F
fadescreen 0x0
fadescreen 0x3
playsong 0x22B 0x0
showsprite 0x01
clearflag 0x94B
fadescreen 0x2
pause 0x55
sound 0x2B
pause 0x30
sound 0x14
setmaptile 0xB 0x7 0x384 0x0
setmaptile 0xB 0x8 0x38C 0x0
setmaptile 0xC 0x7 0x385 0x0
setmaptile 0xC 0x8 0x38D 0x0
special 0x91
pause 0x40
cry 0x19A 0x0
waitcry
applymovement 0x1 @mv3
waitmovement 0x0
fadescreen 0x1
applymovement MOVE_CAMERA @mv4
waitmovement 0x7F
fadescreen 0x0
msgbox @7 MSG_NORMAL
applymovement 0x1 @mv5
waitmovement 0x0
cry 0x19A 0x0
msgbox @5 MSG_NORMAL '"Deoxys: Ashaaa!!"
waitcry
setwildbattle 0x19A 0x50 0x0
special 0x139
playsong 0x227 0x0
waitstate
fadescreen 0x1
hidesprite 0x1
hidesprite 0x3
special 0x117
fadescreen 0x0
setflag 0x94A
setflag 0x94B
setflag 0x4B4
release
end




#org @1
= The Meteorite appears to be emitting\na strange aura.

#org @2
= The Meteorite appears to be emitting\na strange aura.

#org @3
= The Meteorite appears to have\nstabilized[.]

#org @4
= What's this?\pRayquaza's Pokéball is shaking\nuncontrollably!

#org @5
= Deoxys: Ashaaa!!

#org @newmsg
= It seems Rayquaza senses danger\nnearby....

#org @7
= Something appears to be approaching\nfrom outside the atmosphere!

#org @mv1
#raw 0x56 'Exclamation Mark (!)
#raw 0xFE 'End of Movements

#org @mv2
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0xFE 'End of Movements

#org @mv3
#raw 0x4 'Step Down (Slow)
#raw 0x4 'Step Down (Slow)
#raw 0x4 'Step Down (Slow)
#raw 0x4 'Step Down (Slow)
#raw 0x4 'Step Down (Slow)
#raw 0x4 'Step Down (Slow)
#raw 0x4 'Step Down (Slow)
#raw 0x4 'Step Down (Slow)
#raw 0x4 'Step Down (Slow)
#raw 0x4 'Step Down (Slow)
#raw 0x4 'Step Down (Slow)
#raw 0x4 'Step Down (Slow)
#raw 0x4 'Step Down (Slow)
#raw 0x4 'Step Down (Slow)
#raw 0x4 'Step Down (Slow)
#raw 0xFE 'End of Movements

#org @mv4
#raw 0x08
#raw 0x08
#raw 0x08
#raw 0x08
#raw 0x08
#raw 0x08
#raw 0x08
#raw 0x08
#raw 0x08
#raw 0x08
#raw 0x08
#raw 0x08
#raw 0x08
#raw 0x08
#raw 0x08
#raw 0x08
#raw 0x08
#raw 0x08
#raw 0x08
#raw 0x08
#raw 0x08
#raw 0xFE 'End of Movements

#org @mv5
#raw 0x4 'Step Down (Slow)
#raw 0x4 'Step Down (Slow)
#raw 0x4 'Step Down (Slow)
#raw 0x4 'Step Down (Slow)
#raw 0x4 'Step Down (Slow)
#raw 0xFE 'End of Movements

#org @mv6
#raw 0x40 'mov40
#raw 0x29
#raw 0xFE 'End of Movements

Are you sure the 0x1 corresponds with the person event number 0x1 (and not the number above it) in AdvanceMap? That's the only thing I can think of right now.
 

DrFuji

[I]Heiki Hecchara‌‌[/I]
1,691
Posts
14
Years
OW 0x1 is probably too far way to be loaded by the game when the script reaches @mv5. You're moving the camera/ that OW over some pretty huge distances so I wouldn't be surprised if that was the case. As a test, try moving the OW down by two or three tiles in A-Map and play the script. If @mv5 is triggered correctly, you've got your reason as to why its not working right now. If that doesn't work then ¯\_(ツ)_/¯
 
157
Posts
7
Years
  • Age 26
  • Seen Nov 19, 2023
OW 0x1 is probably too far way to be loaded by the game when the script reaches @mv5. You're moving the camera/ that OW over some pretty huge distances so I wouldn't be surprised if that was the case. As a test, try moving the OW down by two or three tiles in A-Map and play the script. If @mv5 is triggered correctly, you've got your reason as to why its not working right now. If that doesn't work then ¯\_(ツ)_/¯

Thank you so much for this. I didn't know moving the camera so far away could compromise applymovement commands by making the sprites in question too far away on the map. Regardless, with that knowledge I was able to pretty easily fix the problems with the script. Thanks a heap!
 
157
Posts
7
Years
  • Age 26
  • Seen Nov 19, 2023
OW 0x1 is probably too far way to be loaded by the game when the script reaches @mv5. You're moving the camera/ that OW over some pretty huge distances so I wouldn't be surprised if that was the case. As a test, try moving the OW down by two or three tiles in A-Map and play the script. If @mv5 is triggered correctly, you've got your reason as to why its not working right now. If that doesn't work then ¯\_(ツ)_/¯
While I've got ya here, just had a bit of a random question, all good if you don't have an answer :). I'm pretty keen to expand the battle background table in Emerald, I know where it is and am pretty confident that I won't have any problems moving it to free space and fixing up the pointers. The only thing concerning me is how I'm going to get A-map to recognize the expanded slots in the table if that makes sense. So I was just wondering if you knew how that would work and if there was anything else I missed that might be necessary throughout the process.
 

DrFuji

[I]Heiki Hecchara‌‌[/I]
1,691
Posts
14
Years
Do you mean having a specific battleground appear depending on the tile you're standing on/ map you're in, etc?
 
Back
Top