The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Fan Games > Binary ROM Hacking
Reload this Page Script applymovement freezes rom, copied XSE tutorial

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 August 15th, 2018 (10:59 AM). Edited August 15th, 2018 by DoctorKoolMan.
DoctorKoolMan's Avatar
DoctorKoolMan DoctorKoolMan is offline
 
Join Date: Apr 2015
Location: United States
Age: 28
Gender: Male
Posts: 36
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
Reply With Quote
  #2   Link to this post, but load the entire thread.  
Old August 15th, 2018 (12:36 PM).
masterquestmq's Avatar
masterquestmq masterquestmq is offline
Enthusiastic Rom Hacker
 
Join Date: Nov 2010
Gender: Male
Posts: 193
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!
Reply With Quote
  #3   Link to this post, but load the entire thread.  
Old August 15th, 2018 (12:47 PM).
DoctorKoolMan's Avatar
DoctorKoolMan DoctorKoolMan is offline
 
Join Date: Apr 2015
Location: United States
Age: 28
Gender: Male
Posts: 36
Thank you! That worked perfectly.

So should I be setting any script tile to these unknowns and variables? Or just any applymovement scripts?
Reply With Quote
  #4   Link to this post, but load the entire thread.  
Old August 15th, 2018 (12:49 PM).
masterquestmq's Avatar
masterquestmq masterquestmq is offline
Enthusiastic Rom Hacker
 
Join Date: Nov 2010
Gender: Male
Posts: 193
Quote:
Originally Posted by DoctorKoolMan View Post
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 :)
Reply With Quote
  #5   Link to this post, but load the entire thread.  
Old August 15th, 2018 (12:51 PM).
DoctorKoolMan's Avatar
DoctorKoolMan DoctorKoolMan is offline
 
Join Date: Apr 2015
Location: United States
Age: 28
Gender: Male
Posts: 36
Quote:
Originally Posted by masterquestmq View Post
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!
Reply With Quote
  #6   Link to this post, but load the entire thread.  
Old August 15th, 2018 (1:12 PM).
masterquestmq's Avatar
masterquestmq masterquestmq is offline
Enthusiastic Rom Hacker
 
Join Date: Nov 2010
Gender: Male
Posts: 193
Quote:
Originally Posted by DoctorKoolMan View Post
Then I shall do that as well, haha.

Thanks again!
no worries!
Good luck with the hack!
Reply With Quote
  #7   Link to this post, but load the entire thread.  
Old March 6th, 2021 (4:22 PM).
mr_chub mr_chub is offline
 
Join Date: Jan 2021
Posts: 7
I just ran into this same problem and the fact that this fix works is weird lol. Does anyone have any idea why?
Reply With Quote
  #8   Link to this post, but load the entire thread.  
Old March 6th, 2021 (4:31 PM).
kalarie kalarie is offline
 
Join Date: Jun 2008
Posts: 760
@mr_hub

Because you need to assign a variable that holds a certain value for a script event to trigger? Nothing weird about that.
Reply With Quote
  #9   Link to this post, but load the entire thread.  
Old March 7th, 2021 (12:15 AM).
mr_chub mr_chub is offline
 
Join Date: Jan 2021
Posts: 7
Yeah I guess not, more weird that I didn't see that answer in that same tutorial.
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
Thread Tools

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