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 Script compiles but doesn't work properly. (https://www.pokecommunity.com/showthread.php?t=410122)

myrongains June 26th, 2018 7:41 AM

Script compiles but doesn't work properly.
 
I want the player to be able to grab the running shoes via an item ball on their desk. The script works in that the shoes are enabled after and the fanfare/fade screen happen, but for some reason none of the text appears. Anyone have any ideas?

Spoiler:
#dynamic 0x800000
#org @start
lock
faceplayer
checkflag 0x200
msgbox @talk1 0x6
setflag 0x82F
fanfare 0x13E
msgbox @talk2 0x6
waitfanfare
msgbox @talk3 0x6
closeonkeypress
fadescreen 1
hidesprite 0x800F
setflag 0x200
fadescreen 0
release
end

#org @talk1
= I almost forgot my Running Shoes.

#org @talk2
= \v\h01 put on Running Shoes!

#org @talk3
= Now we're ready!

hjk321 June 26th, 2018 8:41 AM

Not too experienced myself, but pretty sure having that checkflag makes it so some stuff wouldn't get executed. Try deleting that command? It doesn't look like it does anything in your code.

BirdstarCat13 June 26th, 2018 5:47 PM

I'm not an expert on scripting, but here's what I came up with (edits have comments after them, comments are bolded and can be removed if you want tp use this.):

Code:

#dynamic 0x800000
#org @start
lock //Removed checkfalg because it didn't seem to be useful. Removed faceplayer becase it's not useful on scripts that are for a "hidden item" ball.
msgbox @talk1 0x6
setflag 0x82F
fanfare 0x13E
msgbox @talk2 0x6
waitfanfare
msgbox @talk3 0x6
closeonkeypress
fadescreen 1
hidesprite 0x800F //removed setflag becuse the checkflag wasn't really doing anything anyway (if you wanted it to be used, then do checkflag, then an if statement comparing the value)
fadescreen 0
release
end

#org @talk1
= I almost forgot my Running Shoes.

#org @talk2
= [player] put on Running Shoes! //I don't know if what you had was "technically the same thing", it's personal preference which you want to use I guess. (also depends on if you want it to be "Player put on Running Shoes" or just "Put on Running Shoes.")

#org @talk3
= Now we're ready!




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