The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Fan Games > Binary ROM Hacking
Reload this Page Other Applymovement issues

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 May 24th, 2016 (8:24 PM). Edited May 25th, 2016 by Far Way.
Far Way Far Way is offline
 
Join Date: Nov 2015
Location: North Carolina
Gender: Male
Nature: Calm
Posts: 86
I have it so that a character is blocking a door when a flag is not on, and when he is interacted with when the flag is on, he is supposed to say something then move left and face down to let the player into the door. However, he is not moving.

This is the script I am using:

Spoiler:
'---------------
#org 0x2A2A39
checkflag 0x4F00
if 0x0 goto 0x82A29FE
msgbox 0x82A29CC MSG_FACE '"The shuttle is to take off soon.\n..."
applymovement 0x11 0x82A2A33
waitmovement 0x0
release
end

'---------------
#org 0x2A29FE
msgbox 0x82A2A08 MSG_FACE '"Sorry, the shuttle isn't ready\nju..."
end


'---------
' Strings
'---------
#org 0x2A29CC
= The shuttle is to take off soon.\nYou may enter.

#org 0x2A2A08
= Sorry, the shuttle isn't ready\njust yet.


'-----------
' Movements
'-----------
#org 0x2A2A33
#raw 0x12 'Step Left (Normal)
#raw 0x0 'Face Down


Could anybody tell me of any mistakes I might have made? Thanks in advance.
Reply With Quote
  #2   Link to this post, but load the entire thread.  
Old May 24th, 2016 (8:33 PM). Edited May 25th, 2016 by esperance.
esperance's Avatar
esperance esperance is offline
 
Join Date: Mar 2010
Location: OH
Age: 26
Gender: Male
Nature: Relaxed
Posts: 3,830
First thing you'll want to do is include is a lock command. Using MSG_FACE as you have is intended to only be used in scripts where the NPC only has a simple message to say.

Another common mistake beginners make is providing the incorrect person number to applymovement by mistakenly thinking 0x11 is the same as 11 in decimal, when the correct value for 11 in hex is 0xB (assuming you did indeed make such a mistake).

Spoiler:
'---------------
#org 0x2A2A39
lock
// you can add "faceplayer" here if desired
checkflag 0x200 // use a lower flag
if 0x0 goto 0x82A29FE
msgbox 0x82A29CC MSG_KEEPOPEN '"The shuttle is to take off soon.\n..."
applymovement 0x11 0x82A2A33
waitmovement 0x0
release
end

'---------------
#org 0x2A29FE
msgbox 0x82A2A08 MSG_KEEPOPEN '"Sorry, the shuttle isn't ready\nju..."
release
end


'---------
' Strings
'---------
#org 0x2A29CC
= The shuttle is to take off soon.\nYou may enter.

#org 0x2A2A08
= Sorry, the shuttle isn't ready\njust yet.


'-----------
' Movements
'-----------
#org 0x2A2A33
#raw 0x12 'Step Left (Normal)
#raw 0x0 'Face Down
#raw 0xFE // always end movements with an FE


I've fixed the lock command for you.
__________________
What are you so afraid of?
Reply With Quote
  #3   Link to this post, but load the entire thread.  
Old May 25th, 2016 (2:58 AM). Edited May 25th, 2016 by C me.
C me's Avatar
C me C me is offline
Creator of Pokemon League Of Legends
 
Join Date: Jan 2014
Age: 26
Gender: Male
Posts: 681
Lets not forget you are mssing a raw 0xFE at the end of your movements. Plus that flag is way too big you should look at the safe flags to use.
Reply With Quote
  #4   Link to this post, but load the entire thread.  
Old May 25th, 2016 (12:48 PM).
Far Way Far Way is offline
 
Join Date: Nov 2015
Location: North Carolina
Gender: Male
Nature: Calm
Posts: 86
Thank you, Youmu! I will now test it out and if it works, this problem is resolved.
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:08 AM.