The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Fan Games > Binary ROM Hacking
Reload this Page Script [EM] Script (XSE) freezes game

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 5th, 2018 (3:48 AM). Edited August 6th, 2018 by Chillaxo.
Chillaxo's Avatar
Chillaxo Chillaxo is offline
 
Join Date: Nov 2017
Posts: 8
So I am still desperate failing to find out what's wrong with my script for my Emerald based hack. It is supposed to activate, when you step on a certain script in the OW.

What I want the script to do is: First to check that the event hasnt happened yet and to make sure that a certain sprite is hidden until one has fought the rival in Rustboro City.
Once that is done, stepping on the script shall make you (/the protagonist) notice (#raw 0x56) that a new person is on the map who wants to battle you. Screen fades black, you are slightly warped, screen turns normal, and the person appears and walks towards you. Blabla and Battle. After you win, the person gives you an item and walks away and disappears again (hidesprite 0x23).

By experimenting, I could figure out that the script would hide the sprite when neither flag 0x23 nor 0xD3 are set. As it is supposed to do. Only when flag 0xD3 is activated, the according subscript freezes the game.

The Script:
Spoiler:
#dynamic 0x800000
#freespace 0xFF

#org @start
checkflag 0x23 //the flag is off in the beginning
if 0x1 goto @end1
checkflag 0xD3 //assures that the main purpose only activates after battling the rival in Rustboro City
if 0x1 goto @battle
hidesprite 0x23
release
end

#org @end1
hidesprite 0x23
release
end

#org @battle
lock
applymovement 0xFF @moveEX
waitmovement 0x0
fadescreen 0x1
showsprite 0x23
warp 0x0 0x13 0xFF 0x17 0x2C //moves the hero into another location on the same map
fadescreen 0x0
applymovement 0x23 @movetohero
waitmovement 0x0
msgbox @text1 0x6
trainerbattle 0x1 0x287 0x0 @beforeb @afterb @laterb
release
end

#org @laterb
msgbox @textafter 0x6
giveitem 0x1DB 0x1 MSG_Obtain
msgbox @bye 0x6
applymovement 0x23 @runaway
waitmovement 0x0
hidesprite 0x23
setflag 0x23
release
end

Movements:
Spoiler:
#org @moveEX
#raw 0x56
#raw 0xFE

#org @movetohero
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0xFE

#org @runaway
#raw 0x15
#raw 0x15
#raw 0x15
#raw 0x15
#raw 0x15
#raw 0x15
#raw 0x15
#raw 0x15
#raw 0x15
#raw 0xFE


Strings:
Spoiler:
#org @text1
= There you are again! I'm glad to\nmeet you here. I spent the past\ldays training my Pokémon a lot.\lLet me show you how to battle like\la champ!

#org @beforeb
= Let's get it started!

#org @afterb
= Aaargh...

#org @textafter
= I can't believe that I have lost.\nI guess I still have to grow...\lbut don't worry. I will challange\lyou again. You should keep the\ltraining! Maybe this TM can help\lyou.

#org @bye
= I got to jet. See you soon!



EDIT/Solved: I had to figure out that all my problems were mostly caused by a too great tile-distance of the script and the NPC. I assumed warping the player closer to the NPC would avoid that. It did not though. Fixing OW positions "fixed" the script.
Reply With Quote
  #2   Link to this post, but load the entire thread.  
Old August 5th, 2018 (7:52 PM).
BirdstarCat13 BirdstarCat13 is offline
 
Join Date: Nov 2017
Gender: Male
Posts: 476
Maybe D3 is already being used by the game?
__________________
-------------------------
I hate signatures that are just a line of text without any clear division. You weirdos know who you are ;)
Reply With Quote
  #3   Link to this post, but load the entire thread.  
Old August 6th, 2018 (1:14 AM).
Chillaxo's Avatar
Chillaxo Chillaxo is offline
 
Join Date: Nov 2017
Posts: 8
Quote:
Originally Posted by BirdstarCat13 View Post
Maybe D3 is already being used by the game?
It is indeed already being used by the game. I used it on purpose to put my new event into the preset order of the story events of the game.
I could eventually fix the problem. OP is edited. Still thank you.
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
Thread Tools

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:14 AM.