The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Fan Games > Binary ROM Hacking
Reload this Page Script Need Help With Script, Again...

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 November 26th, 2016 (7:14 PM).
DubTheNarwhals's Avatar
DubTheNarwhals DubTheNarwhals is offline
 
Join Date: Aug 2016
Gender: Male
Nature: Quiet
Posts: 6
This script is a script not a person event and every time I step on it the game freeze.
heres the script:
#dynamic 0x800000
#org @start
checkflag 0x202
if 0x1 goto @end
lock
msgbox @t1 0x6
applymovement 0xFF @m1
waitmovement 0x0
release
end
#org @m1
#raw 0x8
#raw 0xFE
#org @t1
= Looks like these pokemon are\nfighting, better back off.
#org @end
end
It's suppose to make the player move back when they step on the script if the flag is clear. If the flag not clear it's suppose to do nothing. How can I fix this?
Reply With Quote
  #2   Link to this post, but load the entire thread.  
Old November 26th, 2016 (8:49 PM).
Matthatter03 Matthatter03 is offline
 
Join Date: Dec 2015
Gender: Male
Posts: 71
I don't see anything directly wrong with the script, and I am new to rom hacking, but I have been told and noticed that flags generally have less problems when they are above 1200, so it is a possibility it isn't working well because the flag you are checking is 202, but I don't know how much a difference it makes.
Reply With Quote
  #3   Link to this post, but load the entire thread.  
Old November 26th, 2016 (9:13 PM). Edited November 26th, 2016 by mbcn10ww.
mbcn10ww mbcn10ww is offline
 
Join Date: Oct 2016
Posts: 352
Quote:
Originally Posted by DubTheNarwhals View Post
This script is a script not a person event and every time I step on it the game freeze.
heres the script:
#dynamic 0x800000
#org @start
checkflag 0x202
if 0x1 goto @end
lock
msgbox @t1 0x6
applymovement 0xFF @m1
waitmovement 0x0
release
end
#org @m1
#raw 0x8
#raw 0xFE
#org @t1
= Looks like these pokemon are\nfighting, better back off.
#org @end
end
It's suppose to make the player move back when they step on the script if the flag is clear. If the flag not clear it's suppose to do nothing. How can I fix this?
I don't know if I'm right, but I think your @end cannot be empty, then place the "lock" before the "checkflag" instead after, then place "release" at your @end, and test it.

EDIT:
I've found something useful:

applymovement
Arguments:
byte-or-variable index
pointer movements
Applies the movement data at movements to the specified (index) Person event. Also closes any standard message boxes that are still open.
Indices 0xFF and 0x7F refer to the player and the camera, respectively. Running this command from a Script event will crash the game unless that Script event's "Unknown" field (in AdvanceMap) is "$0003" and its "Var number" field refers to a valid script variable.
Reply With Quote
  #4   Link to this post, but load the entire thread.  
Old November 26th, 2016 (9:54 PM).
DubTheNarwhals's Avatar
DubTheNarwhals DubTheNarwhals is offline
 
Join Date: Aug 2016
Gender: Male
Nature: Quiet
Posts: 6
Thanks For Your Help, I'm Still Kinda New To Rom Hacking And The Tutorial I Was Watching Didn't Mention This Info.
__________________
When You Realize You Wasted Your Time
Reply With Quote
  #5   Link to this post, but load the entire thread.  
Old November 27th, 2016 (9:29 AM).
mbcn10ww mbcn10ww is offline
 
Join Date: Oct 2016
Posts: 352
Quote:
Originally Posted by DubTheNarwhals View Post
Thanks For Your Help, I'm Still Kinda New To Rom Hacking And The Tutorial I Was Watching Didn't Mention This Info.
If you want more information about scripting, take a look at this page, I think it is the best of scripting.
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.