The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Fan Games > Binary ROM Hacking
Reload this Page Script Making the Player Move

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 July 8th, 2020 (1:01 PM).
Harisson Harisson is offline
 
Join Date: Mar 2016
Posts: 2
Hello everyone.

This is my first post in this forum and since I am a beginner at Rom Hacking and Scripting, I want to try many different ways of making my game more interesting.
Since I've tried to make a script in which the player is forced to move to a specific location like when he enters Lance's room in the victory road.

So I've inserted an script - event at AdvanceMap at the location I wanted to the script to start.
Furthermore, I've written the following text for my script and put the offset to the script event.

#dynamic 0x800000
#org @start
lock
applymovement 0xFF @1
waitmovement 0x0
release
end

#org @1
#raw 0x11
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0xFE


However, since the player reaches the spot in which the event should begin, the game freezes.
I was wondering if it's because of the lock command in line 3 of my program text.
So I removed it and now the event isn't started at all.

I've tried to look up tutorials on YouTube without any success.

I really would appreciate your help concerning my problem.

Thank you very much.
Reply With Quote
  #2   Link to this post, but load the entire thread.  
Old July 10th, 2020 (4:16 PM).
Skypaw101 Skypaw101 is offline
 
Join Date: Mar 2017
Posts: 4
I tried using your script and it worked fine in my game. You might need to set the variable, for that script?

setvar 0xAAAA 0x01

where AAAA is the number of the variable for that particular script event. You can find it in Advance map. I would place this line of code just before the release command.

I don't know enough about scripting to tell you for sure what's up :( I have had trouble using applymovement in more complicated scripts too.
Reply With Quote
  #3   Link to this post, but load the entire thread.  
Old July 11th, 2020 (12:17 AM). Edited July 15th, 2020 by Pyxal.
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 Harisson View Post
<snip>
In order for a script to work, the value needs to be 0000, and the var number box should be filled with any number. Though keep in mind to use safe var numbers. For example:

Var Number: 4011
Var Value: 0000
__________________
Reply With Quote
  #4   Link to this post, but load the entire thread.  
Old July 11th, 2020 (7:37 AM).
Harisson Harisson is offline
 
Join Date: Mar 2016
Posts: 2
Hey Skypaw101 and PokeChu,

by including the variable, I made my script work as intended.

I really appreciate your help.

Thank you very much.
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.