The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Fan Games > Binary ROM Hacking
Reload this Page Other Scripting Help (Applymovement)

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 January 31st, 2015 (2:38 PM).
ParadymeShift's Avatar
ParadymeShift ParadymeShift is offline
 
Join Date: Jan 2015
Gender: Male
Posts: 16
Here is the script.

#dynamic 0x800150

#org @start
applymovement 0x01 @walk1
msgbox @talk1 0x6
applymovement 0xFF @walk2
setflag 0x1
release
end

#org @talk1
= HEY!\pThere's a rare Bird Pokemon in\nthat tree! Don't come this way\luntil I'm done sketching it, okay?\p

#org @walk1
#raw 0x62
#raw 0xFE

#org @walk2
#raw 0x63
#raw 0x1F
#raw 0x1F
#raw 0xFE

I don't quite understand what I am doing wrong. Is there an issue with the flags or is the movement?
Reply With Quote
  #2   Link to this post, but load the entire thread.  
Old January 31st, 2015 (2:53 PM).
Sefuree's Avatar
Sefuree Sefuree is offline
Canada Goose
 
Join Date: May 2014
Location: Canada
Age: 22
Gender: Male
Nature: Adamant
Posts: 3,183
Spoiler:
Quote:
Originally Posted by ParadymeShift View Post
Here is the script.

#dynamic 0x800150

#org @start
applymovement 0x01 @walk1
msgbox @talk1 0x6
applymovement 0xFF @walk2
setflag 0x1
release
end

#org @talk1
= HEY!\pThere's a rare Bird Pokemon in\nthat tree! Don't come this way\luntil I'm done sketching it, okay?\p

#org @walk1
#raw 0x62
#raw 0xFE

#org @walk2
#raw 0x63
#raw 0x1F
#raw 0x1F
#raw 0xFE

I don't quite understand what I am doing wrong. Is there an issue with the flags or is the movement?


Well, try using this for your movement script: http://www.pokecommunity.com/misc.php?do=movie
__________________

:)
Reply With Quote
  #3   Link to this post, but load the entire thread.  
Old January 31st, 2015 (2:55 PM).
Mana's Avatar
Mana Mana is offline
 
Join Date: Jan 2009
Location: UK
Age: 31
Gender: Male
Posts: 10,075
What exactly is/isn't working?


General notes:

For flags, it's best to use those from 200-2FF (see here).

As for your script, you need a waitmovement after each movement. Put 'waitmovement 0x0' directly after each one.

#dynamic can stay at 0x800000. No need to use specific offsets.
__________________
Reply With Quote
  #4   Link to this post, but load the entire thread.  
Old January 31st, 2015 (3:16 PM). Edited January 31st, 2015 by ParadymeShift.
ParadymeShift's Avatar
ParadymeShift ParadymeShift is offline
 
Join Date: Jan 2015
Gender: Male
Posts: 16
So I did the waitmovement 0x0 after each of my applys but it still does not work. When I run over the script location on the ROM the game freezes up and crashes. Any ideas as to what might be going wrong? The group of people I am scripting for are also using JPAN's version of FireRed and they sent me the IPS to patch a clear ROM due to the fact that the leader sent the actual ROM to the music editor for implementing music. Could the reason the game is messing up be because of the fact that I patched a regular FireRed ROM and don't have the ROM file the team leader sent to the music editor?

Also, thanks for that tool OCD! Seems pretty useful.

EDIT: Also, here is the fixed script.

#dynamic 0x800268

#org @start
applymovement 0x01 @walk1
waitmovement 0x0
msgbox @talk1 0x6
applymovement 0xFF @walk2
waitmovement 0x0
setflag 0x200
release
end

#org @talk1
= HEY!\pThere's a rare Bird Pokemon in\nthat tree! Don't come this way\luntil I'm done sketching it, okay?\p

#org @walk1
#raw 0x62
#raw 0xFE

#org @walk2
#raw 0x63
#raw 0x1F
#raw 0x1F
#raw 0xFE
__________________
Scripting for a Pokemon hack be like...

Reply With Quote
  #5   Link to this post, but load the entire thread.  
Old January 31st, 2015 (3:24 PM).
Mana's Avatar
Mana Mana is offline
 
Join Date: Jan 2009
Location: UK
Age: 31
Gender: Male
Posts: 10,075
Ah I see. The fact it's a script tile is your problem. Script tiles need variables to work correctly - the tutorial I linked for the flags in my last post has some guidance on how to use them :).
__________________
Reply With Quote
  #6   Link to this post, but load the entire thread.  
Old January 31st, 2015 (3:34 PM).
ParadymeShift's Avatar
ParadymeShift ParadymeShift is offline
 
Join Date: Jan 2015
Gender: Male
Posts: 16
Thanks! I will read over this page to learn how to use them. But do you know how I can exactly fix the variables in this case to make the script above work?
__________________
Scripting for a Pokemon hack be like...

Reply With Quote
  #7   Link to this post, but load the entire thread.  
Old January 31st, 2015 (3:41 PM).
Mana's Avatar
Mana Mana is offline
 
Join Date: Jan 2009
Location: UK
Age: 31
Gender: Male
Posts: 10,075
It's a case of assigning the script tile a variable in a-map. Then, while the variable is zero the script will repeat-run.

Then if the variable is set (IE 0x1) then the script will be turned off and the player will be able to walk over it.
__________________
Reply With Quote
  #8   Link to this post, but load the entire thread.  
Old January 31st, 2015 (3:48 PM).
ParadymeShift's Avatar
ParadymeShift ParadymeShift is offline
 
Join Date: Jan 2015
Gender: Male
Posts: 16
Quote:
Originally Posted by Magic View Post
It's a case of assigning the script tile a variable in a-map. Then, while the variable is zero the script will repeat-run.

Then if the variable is set (IE 0x1) then the script will be turned off and the player will be able to walk over it.
Heck yes, it worked! Thanks a bunch for your help Magic!
__________________
Scripting for a Pokemon hack be like...

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

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