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)
-   -   Script First romhack -Fire red Hidesprite help (https://www.pokecommunity.com/showthread.php?t=467300)

BH1642 March 7th, 2022 8:10 PM

First romhack -Fire red Hidesprite help
 
Hi, I am hoping someone may be able to help.
I am creating my first ROM Hack in Fire Red as a proposal for my partner ( Little cliché and done before, I know)

I am having trouble with the following code
I am trying to give the player a pokemon on then have the NPC disappear, it is set to trigger after defeating each gym leader (Brock for this example)
I cannot get this to work, either the NPC continues to give the pokemon and infinate amount of times or disappears before that point or the games crashes.
I having been working on this for days and cannot get it right. I'm sure it is the stupidest little thing but I am lost.

#org 0x803DE0
lock
faceplayer
checkflag 0x254
if 0x0 goto 0x8803E12
checkflag 0x1202
if 0x1 goto 0x8803E1D
msgbox 0x8803E4C MSG_YESNO '"YOU DID IT!\nCould you really be t..."
compare LASTRESULT 0x1
if 0x1 goto 0x8803E23
msgbox 0x8803E8F MSG_NORMAL '"Oh no! What ever will we do now!"
release
end

'---------------
#org 0x803E12
msgbox 0x8803FC7 MSG_NORMAL '" SHHHHHHH! NOT NOW!\nDefeat him fi..."
release
end

'---------------
#org 0x803E1D
hidesprite 0x4
setflag 0x1203
release
end

'---------------
#org 0x803E23
msgbox 0x8803EB2 MSG_NORMAL '"I knew it was you!\nPlease look af..."
givepokemon 0xFC 0xA 0x0 0x0 0x0 0x0
fanfare 0x13E
msgbox 0x8803FB0 MSG_NORMAL '"[player] recieved a UNOWN!"
waitfanfare
setflag 0x1202
release
end

Any help or suggestions would be greatly appreciated.

Tacobell24 March 8th, 2022 12:06 AM

So, I'm not too sure about the code, sorry.

But can I suggest fixing the typos at least?
Specifically: "received an Unown

and

"What ever will we do now?!"

Have you also checked the header script of the map? There may be something in that that is causing the issue, maybe


All times are GMT -8. The time now is 9:20 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.