The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Fan Games > Binary ROM Hacking
Reload this Page Script [Emerald] Replacing HMs with items and I have an issue with the Pokémon showing when using an HM device

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 October 29th, 2020 (2:09 AM). Edited October 29th, 2020 by McPaul.
McPaul's Avatar
McPaul McPaul is offline
On my way to become a controversial and hated member.
 
Join Date: Mar 2018
Location: Switzerland
Gender: Male
Posts: 286
Hello!

I'm replacing HM moves with HM devices in my hack and I have an issue in my way of scripting. Since it doesn't check anymore if a Pokémon has a move or not the script doesn't know what Pokémon to use when using the HM (with the black bar animation and such) and seems to be random. I would like it to always be the first Pokémon in your party, what command mudt be used for this?

Here is the script:
Spoiler:
'---------------
#freespace 0xFF
#dynamic 0x9C0B20
#org @start
lockall
checkflag 0x867
if 0x0 goto @snippet1
checkitem 0x153 0x1
compare LASTRESULT 0x6
if 0x1 goto @snippet1
setanimation 0x0 LASTRESULT
bufferpartypokemon 0x0 LASTRESULT
bufferitem 0x1 0xF
msgbox @string1 MSG_YESNO '"This tree looks like it can be\nCU..."
compare LASTRESULT 0x0
if 0x1 goto @snippet2
msgbox @string2 MSG_KEEPOPEN '"[buffer1] used [buffer2]!"
closeonkeypress
doanimation 0x2
waitstate
goto @snippet3

'---------------
#org @snippet1
msgbox @string3 MSG_KEEPOPEN '"This tree looks like it can be\nCU..."
releaseall
end

'---------------
#org @snippet2
closeonkeypress
releaseall
end

'---------------
#org @snippet3
applymovement LASTTALKED @move1
waitmovement 0x0
hidesprite LASTTALKED
releaseall
end


'---------
' Strings
'---------
#org @string1
= This tree looks like it can be\nCUT down!\pWould you like to CUT it?

#org @string2
= [buffer1] used [buffer2]!\nIt was hilarious!

#org @string3
= This tree looks like it can be\nCUT down!


'-----------
' Movements
'-----------
#org @move1
#raw 0x5B 'mov5B
#raw 0xFE 'End of Movements




thanks for your answer!
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

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:16 AM.