The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Fan Games > Binary ROM Hacking
Reload this Page Script I cannot figure out a basic movement script

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 October 6th, 2020 (7:16 AM).
wcbvei234's Avatar
wcbvei234 wcbvei234 is offline
 
Join Date: Dec 2019
Posts: 19
Title basically says all. I originally wanted to make a script where a guy comes from offscreen, bumps into the player, gets angry, and starts a battle. I couldn't get it to work at all. I'd walk into the space where the script begins, the player is locked in place, and nothing happens at all. So I decided to try the most basic movement script I can think of, and even that doesn't work. Can someone tell me if I'm going insane or something? What am I missing? I'm using "applymovement" to the correct "Person event no." in AdvanceMap. I saw someone not use "lock" in their movement script, but that didn't fix the issue either. Below is the extremely simple code. I appreciate anyone's advice on this matter.

Code:
#dynamic 0x800000
#org @start
lock
applymovement 0x7 @karateWalk
waitmovement 0x0
release
end


#org @karateWalk
#raw 0x11
#raw 0x13
#raw 0xFE
Reply With Quote
  #2   Link to this post, but load the entire thread.  
Old October 6th, 2020 (9:40 AM).
FireFig's Avatar
FireFig FireFig is offline
Ignite
 
Join Date: Jun 2020
Age: 17
Gender: Male
Nature: Calm
Posts: 199
The game freezes ryt, if so you are missing the basic thing.
This is a 'MUST' in script tiles, so all u gotta do is :

•Step 1 : Open up advance map, and select your script tile, and there will be a section in the side with menu like 'unknown' 'var no'..... And so on.

•Step 2 : Now change both the unknown value to 0003 or 0001

•Step 3[optional] : Be BLOWN away!!!

if it still doesn't work send me the full script I will try my best to figure it out :)
Reply With Quote
  #3   Link to this post, but load the entire thread.  
Old October 6th, 2020 (1:09 PM).
Dr. Seuss's Avatar
Dr. Seuss Dr. Seuss is offline
Navegando en mi automóvil, hablando con la nena por el móvil 😎...
 
Join Date: Feb 2014
Location: Guatemala City
Age: 27
Gender: Male
Nature: Brave
Posts: 521
You should also check other things like the person visibility. If the person's flag id has been already set it will never be shown and you should first use a showsprite. Also make sure to locate the person who will move exactly one tile off the screen to prevent it not being drawn because it's too far away from the drawing radius. Finally make sure the person doesn't have the hidden movement type in advance map. These are all the things I could think now that are causing this issue
__________________
Graphic design is my passion...

Click on the picture to see the best hack ever created (?
Reply With Quote
  #4   Link to this post, but load the entire thread.  
Old October 8th, 2020 (10:21 AM).
wcbvei234's Avatar
wcbvei234 wcbvei234 is offline
 
Join Date: Dec 2019
Posts: 19
Quote:
Originally Posted by Azz~kun View Post
The game freezes ryt, if so you are missing the basic thing.
This is a 'MUST' in script tiles, so all u gotta do is :

•Step 1 : Open up advance map, and select your script tile, and there will be a section in the side with menu like 'unknown' 'var no'..... And so on.

•Step 2 : Now change both the unknown value to 0003 or 0001

•Step 3[optional] : Be BLOWN away!!!

if it still doesn't work send me the full script I will try my best to figure it out :)
I tried both your idea and Dr. Seuss', and neither solved the issue 😕 To reiterate, I'm trying to make the simplest script you can imagine, where the player walks onto the script tile, and a man takes a few steps away from him. I'll post some screenshots for you guys to see if I'm missing anything silly:

https://gyazo.com/1acf0ad93df06c0f19173ac463b71333

^ This is where the NPC is in Pallet Town. The script tile is just one tile south of him.

https://gyazo.com/ccffd8685eedf1797c96502d3078a81e

^ This is the person event for the NPC in question. I haven't added any special flags or anything.

https://gyazo.com/9b8698b698f0917657855e0d8dc234a2

^ This is the script info, and the script itself is:

https://gyazo.com/c99d9d56dc26d807b8a7fd6346065065

I really appreciate your and Dr. Seuss' time on this. Thanks for checking out my post in the first place 😄
Reply With Quote
  #5   Link to this post, but load the entire thread.  
Old October 9th, 2020 (10:07 AM).
Entaro Ceraphenine's Avatar
Entaro Ceraphenine Entaro Ceraphenine is offline
 
Join Date: Sep 2016
Location: Katones City
Gender: Male
Nature: Quiet
Posts: 48
You need to associate a variable with a script tile to make it work. Pick a safe variable from 0x4011 to 0x40FF and put it in the Var number box in Advanced Map. Let us assume you picked 0x4069. So you write 4069 in the Var number box. Now, you can keep the Var value 0 or change it to a number. Lets assume you kept it to 0. So what happens now is that if the value of var 0x4069 is 0x0, then the script tile will work.

If you put something other than 0 in the Var value box, say 3, then the script tile will work if the value of 0x4069 is 0x3.

If you want the script tile to activate only once in the gameplay, add a line like "addvar 0x4069 0x1" or "setvar 0x4069 0x(something other than the Var value box)"

That should do it.
__________________
Reply With Quote
  #6   Link to this post, but load the entire thread.  
Old October 9th, 2020 (12:40 PM).
wcbvei234's Avatar
wcbvei234 wcbvei234 is offline
 
Join Date: Dec 2019
Posts: 19
Quote:
Originally Posted by Entaro Ceraphenine View Post
You need to associate a variable with a script tile to make it work. Pick a safe variable from 0x4011 to 0x40FF and put it in the Var number box in Advanced Map. Let us assume you picked 0x4069. So you write 4069 in the Var number box. Now, you can keep the Var value 0 or change it to a number. Lets assume you kept it to 0. So what happens now is that if the value of var 0x4069 is 0x0, then the script tile will work.

If you put something other than 0 in the Var value box, say 3, then the script tile will work if the value of 0x4069 is 0x3.

If you want the script tile to activate only once in the gameplay, add a line like "addvar 0x4069 0x1" or "setvar 0x4069 0x(something other than the Var value box)"

That should do it.
God bless your soul--it works! I almost cried when it worked correctly. Your explanation is perfect, too, as I'm glad you spoke about changing the Var value so the script doesn't repeat. Seriously, thank you. I've been fretting about this for weeks at this point haha! Big shout out to the other guys in this thread who tried helping me to. Thank all of you for your time 😭 <3
Reply With Quote
  #7   Link to this post, but load the entire thread.  
Old October 10th, 2020 (2:12 AM).
Entaro Ceraphenine's Avatar
Entaro Ceraphenine Entaro Ceraphenine is offline
 
Join Date: Sep 2016
Location: Katones City
Gender: Male
Nature: Quiet
Posts: 48
Quote:
Originally Posted by wcbvei234 View Post
God bless your soul--it works! I almost cried when it worked correctly. Your explanation is perfect, too, as I'm glad you spoke about changing the Var value so the script doesn't repeat. Seriously, thank you. I've been fretting about this for weeks at this point haha! Big shout out to the other guys in this thread who tried helping me to. Thank all of you for your time 😭 <3
Np! Glad to help! :D
__________________
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:16 AM.