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 Script to not allow passage not working (https://www.pokecommunity.com/showthread.php?t=360757)

Bakufun1 January 3rd, 2016 12:28 AM

Script to not allow passage not working
 
I have a script I'm going to use to prevent the player from leaving the town without a pokemon, but will let them pass once they receive the starter pokemon (i'm using this in place of oak dragging the player to the lab and doing the whole choose a pokemon thing) but when i step on it, it just gives me a non-existent item then allows passage while i lack a pokemon. I have no idea why this happens and would like help
here's my original script
Spoiler:
'---------------
#org 0x860000
#dynamic 0x860000

#org @start
checkflag 0x828
if 0x1 goto @done
msgbox @1 0x6
applymovement 0xFF @move
release
end

#org @done
release
end

#org @move
#raw 0x10

#org @1
=Shouldn't I be at the park?

And here's the decompiled code
Spoiler:
'---------------
#org 0x860000
checkflag 0x828
if 0x1 goto 0x886014E
msgbox 0x8860036 0x1 '"Shouldn't I be at the park?"
applymovement MOVE_PLAYER 0x608282B
release
end

'---------------
#org 0x86014E
release
end


'---------
' Strings
'---------
#org 0x860036
= Shouldn't I be at the park?

Mana January 3rd, 2016 2:22 AM

So for one thing you should have a 0xFE byte at the end of all movement strings, but also you should be using variables for script tiles rather than flags.

Have a look for karatekid's flags, vars and script tiles tutorial to see :).

Vendily January 3rd, 2016 7:38 AM

Karatekid552's flags, vars and script tiles tutorial is HERE, so you don't have to dig so far to find it.


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