The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Fan Games > Binary ROM Hacking
Reload this Page Script I can't figure out why this script won't work properly

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 September 24th, 2020 (6:05 PM).
srg611103 srg611103 is offline
 
Join Date: Sep 2020
Posts: 4
This script is supposed to make the npc that looks like oak walk down then say a message to the player then walk away then, after the npc walks away the player should take one step up from the tall grass. The problem is the npc and the player won't move and I'm not sure why.I have attached an image of both the map and the script. I would appreciate any help.
Attached Images
File Type: png Capture.PNG‎ (228.9 KB, 16 views) (Save to Dropbox)
Reply With Quote
  #2   Link to this post, but load the entire thread.  
Old September 24th, 2020 (11:39 PM).
__fred__40's Avatar
__fred__40 __fred__40 is offline
fred
 
Join Date: Oct 2019
Location: mt silver
Gender: Male
Nature: Bold
Posts: 277
you are missing the waitmovement command after the move player,maybe that's all it takes to fix this,also try to put waitmovement 0x2,if you are moving the NPC number 2,waitmovement 0xFF after a applymovement 0xFF,etc.
__________________
Reply With Quote
  #3   Link to this post, but load the entire thread.  
Old September 25th, 2020 (7:31 AM).
srg611103 srg611103 is offline
 
Join Date: Sep 2020
Posts: 4
Quote:
Originally Posted by __fred__40 View Post
you are missing the waitmovement command after the move player,maybe that's all it takes to fix this,also try to put waitmovement 0x2,if you are moving the NPC number 2,waitmovement 0xFF after a applymovement 0xFF,etc.
Thanks for the reply. So i tried adding waitmovement 0xFF after the player moves and changing waitmovement 0x0 to waitmovement 0x2 but i did not see any changes
Reply With Quote
  #4   Link to this post, but load the entire thread.  
Old September 25th, 2020 (8:59 AM).
Pyxal's Avatar
Pyxal Pyxal is offline
It's pronounced pixel.
 
Join Date: Jul 2019
Location: Pakistan
Age: 17
Posts: 987
Quote:
Originally Posted by srg611103 View Post
Thanks for the reply. So i tried adding waitmovement 0xFF after the player moves and changing waitmovement 0x0 to waitmovement 0x2 but i did not see any changes
Can you post your script here (in text, from XSE).
__________________
Reply With Quote
  #5   Link to this post, but load the entire thread.  
Old September 25th, 2020 (9:54 AM).
srg611103 srg611103 is offline
 
Join Date: Sep 2020
Posts: 4
Quote:
Originally Posted by Upsurge View Post
Can you post your script here (in text, from XSE).
#dynamic 0x800000

#org @start
checkflag 0x201
if 0x1 goto @done
checkflag 0x200
if 0x1 goto @lab
applymovement 0x2 @move1
waitmovement 0x2
msgbox @t1 0x6
applymovement 0x2 @move2
waitmovement 0x2
applymovement 0xFF @move3
waitmovement 0xFF
setflag 0x200
release
end

#org @lab
msgbox @t2 0x4
closeonkeypress
applymovement 0xFF @move3
waitmovement 0xFF
release
end

#org @done
release
setvar 0x4012 0x1
end

#org @t2
= I should go to the [red_fr]lab[black_fr].

#org @t1
= Prof: I need you to come with me\nto the [red_fr]lab[black_fr] it's urgent.

#org @move1
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0xFE

#org @move2
#raw 0x11
Reply With Quote
  #6   Link to this post, but load the entire thread.  
Old September 25th, 2020 (11:01 AM).
__fred__40's Avatar
__fred__40 __fred__40 is offline
fred
 
Join Date: Oct 2019
Location: mt silver
Gender: Male
Nature: Bold
Posts: 277
i think your prof NPC is too far from the location of the script box from where your script is called.
Try move him down 4/5 blocks
__________________
Reply With Quote
  #7   Link to this post, but load the entire thread.  
Old September 25th, 2020 (3:06 PM).
srg611103 srg611103 is offline
 
Join Date: Sep 2020
Posts: 4
Quote:
Originally Posted by __fred__40 View Post
i think your prof NPC is too far from the location of the script box from where your script is called.
Try move him down 4/5 blocks
Alright i did that and now the npc moves however when the player moves they go down instead of up. I have tried changing #raw 0x10 #raw 0x11 in case i got the values messed up but the player moves down in both cases.
Reply With Quote
  #8   Link to this post, but load the entire thread.  
Old September 25th, 2020 (11:15 PM).
Pyxal's Avatar
Pyxal Pyxal is offline
It's pronounced pixel.
 
Join Date: Jul 2019
Location: Pakistan
Age: 17
Posts: 987
Quote:
Originally Posted by srg611103 View Post
Alright i did that and now the npc moves however when the player moves they go down instead of up. I have tried changing #raw 0x10 #raw 0x11 in case i got the values messed up but the player moves down in both cases.

There, I reworked the whole script for you:
Code:
#dynamic 0x[FSF Offset]

#org @start
lock
checkflag 0x200
if 0x1 goto @done1
applymovement 0x2 @move1
waitmovement 0x0
msgbox @msg1 0x2
waitmsg
applymovement 0x2 @move2
waitmovement 0x0
hidesprite 0x2
applymovement 0xFF @move3
waitmovement 0x0
setflag 0x200
setflag 0x201
release
end

#org @done1
msgbox @msg2 0x2
applymovement 0xFF @move3
end

#org @msg1
= Prof: I need you to come with me\nto the [red_fr]lab[black_fr] it's urgent.

#org @msg2
= I should go to the [red_fr]lab[black_fr].

#org @move1
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0xFE

#org @move2
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0xFE

#org @move3
#raw 0x11
#raw 0xFE
Two important things to point out:
  • I removed the
    checkflag 0x201
    and used it instead for the NPC's (Oak) person flag. So you have to change his Person ID to 201.
  • I've interlinked this script so that you set the variable of the script to 0x1 in another script to avoid a whole flag being wasted + the script being that long.
__________________
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:15 AM.