The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Fan Games > Binary ROM Hacking
Reload this Page Other Script freeze

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 February 17th, 2015 (2:00 AM). Edited February 18th, 2015 by LanceD.
LanceD LanceD is offline
 
Join Date: Feb 2014
Gender: Male
Posts: 82
Hey all!

I'm trying to get a script to work that involves a message box popping up upon my character stepping onto a specific tile. However, the game freezes as soon as my character sets foot onto said tile. There's nothing special included in the script, just a simple message box command.

There are existing events in the game that work like this (although they include more than just text popping up), and even if I copy one of those over it doesn't work, only the original, pre-existing one does, even though they're the same in every way.

Some other types of scripts that I've tested do work, but as soon as I include a message box in those they too stop working and freeze the game.

Any help in resolving this problem would be greatly appreciated. Thanks very much in advance!

Scripting tool used: XSE
ROM: Fire Red v1

Script:
Spoiler:
'---------------
#org 0x800219
checkflag 0x3A1
if 0x1 goto 0x8800230
msgbox 0x8800233 MSG_NORMAL '"Hello there! I hope you'll enjoy y..."
setflag 0x3A1
release
end

'---------------
#org 0x800230
release
end


'---------
' Strings
'---------
#org 0x800233
= Hello there! I hope you'll enjoy your journey!
Reply With Quote
  #2   Link to this post, but load the entire thread.  
Old February 17th, 2015 (2:22 AM).
Mana's Avatar
Mana Mana is offline
 
Join Date: Jan 2009
Location: UK
Age: 31
Gender: Male
Posts: 10,075
Can you show the script you're using?

Script tiles work by using variables to control whether they are on or off. It's quite a common mistake for scripters to miss this out - as it's not needed for person events or signposts. Perhaps that is the mistake? It does cause freezing.

Check out the script tile section of this tutorial.
__________________
Reply With Quote
  #3   Link to this post, but load the entire thread.  
Old February 17th, 2015 (3:19 AM).
LanceD LanceD is offline
 
Join Date: Feb 2014
Gender: Male
Posts: 82
Updated the first post with the script.
Reply With Quote
  #4   Link to this post, but load the entire thread.  
Old February 17th, 2015 (3:25 AM).
Mana's Avatar
Mana Mana is offline
 
Join Date: Jan 2009
Location: UK
Age: 31
Gender: Male
Posts: 10,075
Yep, variables are your fix then.

Rather than using a setflag, your script will then use a variable to stop running the script.

Remove all the flag commands and replace it with a 'setvar 0x_____ 0x1' command after your message and complete the script details in A-Map as the linked tutorial shows. :)
__________________
Reply With Quote
  #5   Link to this post, but load the entire thread.  
Old February 17th, 2015 (3:38 AM).
LanceD LanceD is offline
 
Join Date: Feb 2014
Gender: Male
Posts: 82
Even without the flag stuff in it, it will freeze.

As per your suggestion, I have modified the script with the setvar command:
Spoiler:
'---------------
#org 0x8002A3
msgbox 0x88002C2 MSG_NORMAL '"Hello there! I hope you'll enjoy y..."
setvar 0x3A2 0x1
release
end


'---------
' Strings
'---------
#org 0x8002C2
= Hello there! I hope you'll enjoy your journey!


In A-Map, I have put 03A2 in the Var Number box, and kept the var value bow at 0000.

Now nothing happens at all when I step onto the tile in the game ~_~
Reply With Quote
  #6   Link to this post, but load the entire thread.  
Old February 17th, 2015 (5:04 AM). Edited February 17th, 2015 by Mana.
Mana's Avatar
Mana Mana is offline
 
Join Date: Jan 2009
Location: UK
Age: 31
Gender: Male
Posts: 10,075
03A2 isn't the best number ):. The tutorial gives an idea of 'safe' variables to use - have you tried the script using a variable like 0x4050 (assuming you're not using it in the Oak script, or anything)?


If so it has no reason to freeze, really :s .
__________________
Reply With Quote
  #7   Link to this post, but load the entire thread.  
Old February 17th, 2015 (7:49 AM).
LanceD LanceD is offline
 
Join Date: Feb 2014
Gender: Male
Posts: 82
Works like a charm :) Thanks! And thank you for linking me to that tutorial, too ^^

I'm not making a hack though... yet. Just a bunch of testing and experimenting currently :t150:
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:10 AM.