The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Fan Games > Binary ROM Hacking
Reload this Page Script My script won't trigger the event upon stepping on the tile

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 August 18th, 2019 (11:37 AM). Edited August 18th, 2019 by Tachj.
Tachj's Avatar
Tachj Tachj is offline
 
Join Date: Aug 2019
Posts: 4
My goal with this script is to have a simple interaction with the player and the npc in the room when stepping on the tile once. I have tried this without using a script tile, (instead placing the script on the npc) the flag and the script worked as intended. However, I want the script to trigger when the player steps on the tile. When I place my script's offset on the script tile then proceed the test it, my player freezes in place. The in-game music still plays but, the script doesn't activate leaving me stuck on the script tile.

Extra Info :
I've set the affected npc's person event to 1
I've set the set the script's offset to match the @start offset given to me every time i use the batch compiler on XSE
The npc's person ID is 6000 just like the flag
My Advance Map is currently v1.95
The rom is Pokemon Ruby

Script for the script tile : (Before it is complied)
Code:
#dynamic 0x0800000

#org @start
checkflag 0x6000
if 0x1 goto @motherOne
applymovement 0x1 @messengerZero
waitmovement 0x0
msgbox @messageOne 0x6
applymovement 0x1 @messengerOne
waitmovement 0x0
msgbox @messageTwo 0x6
msgbox @playerOne 0x6
msgbox @messageThree 0x6
msgbox @playerTwo 0x6
msgbox @messageFour 0x6
msgbox @playerThree 0x6
msgbox @messageFive 0x6
applymovement 0x1 @messengerTwo
waitmovement 0x0
msgbox @messageSix 0x6
applymovement 0x1 @messengerThree
waitmovement 0x0
setflag 0x6000
release
end

#org @motherOne
release
end

#org @messageOne
= Mom: Oh...\nWell good morning dear,\lI have some important news.

#org @messageTwo
= Mom: Your father just called me,\nhe wants you to come to his lab\land help him with an\l"experiment".\lNormally I'd hang up the moment I\lheard his voice but,..\lHe's offering you a gift.

#org @playerOne
= [player]: What...\nNo, I...\lI don't know if I want to...\Lsee him right now...

#org @messageThree
= Mom: I thought maybe this was his way\nof making it up to you\lfor what happened...\lbut, if you don't want to see him\lI'll let him know...\lIf you won't go for yourself,\lcan you at least for me?\lI rather not have him pestering me\lmore than he already has becasue\lI couldn't get you to see him.

#org @playerTwo
= [player]: ...

#org @messageFour
= Mom: If you help me out,\lI'll get anything you want\lor let you do anything you want.\lJust once.\lDo we have a deal?

#org @playerThree
= [player]: Fine.

#org @messageFive
= Mom: Great! He should be in the\nnext town north of her.\lI'll be waiting for your return.

#org @messageSix
= Mom: I almost forgot,\nthere is a bit of tall grass\lbetween here and the next town.\lYou should bring your Eevee with you\ljust in case if anything happens.\lYou probably left it's pokeball\lUpstairs.

#org @messengerZero
#raw 0x01
#raw 0x56
#raw 0xFE

#org @messengerOne
#raw 0x03
#raw 0x0B
#raw 0x0B
#raw 0x0B
#raw 0x0B
#raw 0x0B
#raw 0x01
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0xFE

#org @messengerTwo
#raw 0x00
#raw 0x08
#raw 0x08
#raw 0x08
#raw 0x02
#raw 0x0A
#raw 0x0A
#raw 0x0A
#raw 0x56
#raw 0x01
#raw 0xFE

#org @messengerThree
#raw 0x02
#raw 0x06
#raw 0x06
#raw 0xFE
I am a novice in rom hacking so, If I'm missing anything or if any more information is needed to help please ask, Thank you for reading this.
Reply With Quote
  #2   Link to this post, but load the entire thread.  
Old August 18th, 2019 (5:41 PM).
dGxx dGxx is offline
 
Join Date: Oct 2015
Gender: Male
Posts: 46
Im pretty sure u using flag 6000 is ur problem...there is a list of usable flags somewhere on pokecomm u can use instead of 6000...from 200 to 2ff there are plenty of usable flags that are free to use. Check them out, if u cant find it, google fire red free flags and vars
Reply With Quote
  #3   Link to this post, but load the entire thread.  
Old August 18th, 2019 (6:11 PM). Edited August 18th, 2019 by Tachj.
Tachj's Avatar
Tachj Tachj is offline
 
Join Date: Aug 2019
Posts: 4
Alright, so looked up a list of safe pokemon ruby flags. I chose to use 0x3DF as the new flag, recompiled the new script set the new person ID on the npc and set the script tile's new offset. When I entered the room to walk over the tile, the Npc had now disappeared and the script tile no longer locked me in place when i step on the tile. I tested this without flags just in case and the result was the same as the original script's (locked in place). I also tried replicating the same situation on fire red with a simpler event (without flags) and I was locked in place again.
Reply With Quote
  #4   Link to this post, but load the entire thread.  
Old August 18th, 2019 (6:34 PM).
dGxx dGxx is offline
 
Join Date: Oct 2015
Gender: Male
Posts: 46
Well anytime u use tile scripts u need a var equal to the value that the var is currently set to...it is not necessary to use any flags, but a var is a must, and u must know the value it holds at the time to the tile activation...as for ruby, there's not much known about ruby, u should stick to fire red or emerald, i think things work differently on other versions
Reply With Quote
  #5   Link to this post, but load the entire thread.  
Old August 18th, 2019 (7:15 PM). Edited August 18th, 2019 by Tachj.
Tachj's Avatar
Tachj Tachj is offline
 
Join Date: Aug 2019
Posts: 4
I have now altered my script to work with variables. I changed setflag 0x6000 to setvar 0x6000 0x1, the var number on the script tile to 6000, set the Person ID on the npc to 0, deleted the check flag and goto lines along with @motherOne's lines and set the new offset on the script. The npc is back but, the script tile now has no effect when I step on it (not even stuck in place). I will continue to do more testing with this in hopes that things might improve but, If it is the rom itself that is the problem then I'll be sure to try a different rom.
Reply With Quote
  #6   Link to this post, but load the entire thread.  
Old August 19th, 2019 (12:43 PM).
Tachj's Avatar
Tachj Tachj is offline
 
Join Date: Aug 2019
Posts: 4
I think I'm at a loss here. I've now used pokemon fire red to make a script tile with a very basic event.

#dynamic 0x800000

#org @start
msgbox @message 0x6
end

#org @message
= Hi.

The result was the exact same as the result in the original script (frozen in place with the game/music still playing). I don't think this error/bug is in the code or in the advance map (1.9.2/1.9.5) anymore. Is there any other condition that needs to be set outside of the rom that maybe affecting new script tiles?
Reply With Quote
  #7   Link to this post, but load the entire thread.  
Old August 19th, 2019 (12:47 PM). Edited August 19th, 2019 by Child Amnesiac.
Child Amnesiac's Avatar
Child Amnesiac Child Amnesiac is offline
Ever changing
 
Join Date: Mar 2019
Location: Colorado
Age: 23
Gender: Male
Nature: Timid
Posts: 340
Quote:
Originally Posted by Tachj View Post
I think I'm at a loss here. I've now used pokemon fire red to make a script tile with a very basic event.

#dynamic 0x800000

#org @start
msgbox @message 0x6
end

#org @message
= Hi.

The result was the exact same as the result in the original script (frozen in place with the game/music still playing). I don't think this error/bug is in the code or in the advance map (1.9.2/1.9.5) anymore. Is there any other condition that needs to be set outside of the rom that maybe affecting new script tiles?
Try using vars 0x4011- 0x40FF (but don't use 0x4020 - 4025, those are pedometers) also some vars have specific functions, see: This thread for those vars.
Others are unsafe to use, also make sure your script tile has a var assigned to it, keeping it at 0000 will freeze your game.
__________________
The GBA Music Resource
Mega Evolution Patches

Currently working on: Pokemon Sevii

Join the Pokemon Sevii Discord!
Reply With Quote
  #8   Link to this post, but load the entire thread.  
Old August 19th, 2019 (2:35 PM).
dGxx dGxx is offline
 
Join Date: Oct 2015
Gender: Male
Posts: 46
Yea dont use vars that high up either, follow what child amnesiac posted...
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:19 AM.