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 applymovement freezes rom, copied XSE tutorial (https://www.pokecommunity.com/showthread.php?t=412625)

DoctorKoolMan August 15th, 2018 10:59 AM

applymovement freezes rom, copied XSE tutorial
 
I will post my uncompiled script below,

The goal here is to check if the player picks up their backpack before they leave their house. Their 'backpack' contains their pokemon (eevee), pokedex (national), and running shoes. I have this script working and if I pick it up before I leave it lets me thru - so the 'checkflag' part of my applymovement script is working.

What happens is if I step on one of the tiles I linked to the script (3 tiles linked to the same script, is that allowed?) before I pickup the bag the rom just freezes. What I want to happen is have the player 'faceup' and 'step up' so they cannot leave the house without grabbing their bag of stuff.

The XSE tutorial mentions the freezing and a fix but that portion seems to be edited or unfinished? it says to change this... and then a blank line; to this.... and then another blank line :/

Spoiler:
#dynamic 0x902900

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

#org @move1
#raw 0x1
#raw 0x11
#raw 0xFE

#org @1
= Don't forget to grab \nyour stuff before you \lleave!

#org @done
release
end

masterquestmq August 15th, 2018 12:36 PM

Hmmm, don't really see any problem with the script and to answer the question yes, you can use the same script for 3 map tiles.

Try this:
On the script tiles type in 0300 (unknown) and 4050 (var number)

This script should be good to go

#dynamic 0x800000

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

#org @done
release
end

#org @move1
#raw 0x1
#raw 0x11
#raw 0xFE

#org @1
= Don't forget to grab \nyour stuff before you \lleave!

DoctorKoolMan August 15th, 2018 12:47 PM

Thank you! That worked perfectly.

So should I be setting any script tile to these unknowns and variables? Or just any applymovement scripts?

masterquestmq August 15th, 2018 12:49 PM

Quote:

Originally Posted by DoctorKoolMan (Post 9914276)
Thank you! That worked perfectly.

So should I be setting any script tile to these unknowns and variables? Or just any applymovement scripts?

Personally. I do it for all my script tiles and so far so good. so yes :)

DoctorKoolMan August 15th, 2018 12:51 PM

Quote:

Originally Posted by masterquestmq (Post 9914277)
Personally. I do it for all my script tiles and so far so good. so yes :)

Then I shall do that as well, haha.

Thanks again!

masterquestmq August 15th, 2018 1:12 PM

Quote:

Originally Posted by DoctorKoolMan (Post 9914278)
Then I shall do that as well, haha.

Thanks again!

no worries!
Good luck with the hack!

mr_chub March 6th, 2021 4:22 PM

I just ran into this same problem and the fact that this fix works is weird lol. Does anyone have any idea why?

kalarie March 6th, 2021 4:31 PM

@mr_hub

Because you need to assign a variable that holds a certain value for a script event to trigger? Nothing weird about that.

mr_chub March 7th, 2021 12:15 AM

Yeah I guess not, more weird that I didn't see that answer in that same tutorial.


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