The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Fan Games > Binary ROM Hacking
Reload this Page Script [Emerald] A trainer battle is occurring twice when there's no clear indication in the script of a repeated battle.

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 10th, 2021 (5:04 AM).
ShinyTillDawn's Avatar
ShinyTillDawn ShinyTillDawn is offline
 
Join Date: Apr 2020
Posts: 135
I'm very sorry for posting so many help threads. But I literally could not find another thread from searching that has someone else dealing with this same problem.
In the attached script, it's basically the character entering the champion's room and triggering almost the same thing as base Emerald's Wallace battle, but with a different trainer, instead.
What happens is, after the opening dialogue, the player gets thrown into the battle, as expected, with different music thanks to "playsong". But after victory, it does the battle again! Even though, I only put the "trainerbattle" command on 1 line of code, and followed that with "setflag" and "goto". What's interesting (and makes sense) is that the regular trainer battle theme plays on the 2nd battle. And if I change who the trainer is, it repeats that trainer twice instead of two different trainers back to back.

From my testing, the player only battles this trainer twice, not infinitely. The other parts of the script work fine.

I literally don't know what's wrong with the script, and why I'm getting 2 battles back to back. Help would be appreciated.
Reply With Quote
  #2   Link to this post, but load the entire thread.  
Old February 10th, 2021 (6:30 AM).
Anon822 Anon822 is offline
 
Join Date: Nov 2017
Posts: 326
'special 0x3E' seems to be the cause of this issue. Removing it makes the battle only happen once.
Reply With Quote
  #3   Link to this post, but load the entire thread.  
Old February 10th, 2021 (6:36 AM).
ShinyTillDawn's Avatar
ShinyTillDawn ShinyTillDawn is offline
 
Join Date: Apr 2020
Posts: 135
This is from a different script for the battle before that one:


I also used "special 0x3E" and I remember that battle not repeating. Would you agree it's some sort of complicated bug with "trainerbattle 0x3..."?
Reply With Quote
  #4   Link to this post, but load the entire thread.  
Old February 10th, 2021 (6:43 AM).
Anon822 Anon822 is offline
 
Join Date: Nov 2017
Posts: 326
Quote:
Originally Posted by ShinyTillDawn View Post
This is from a different script for the battle before that one:
I also used "special 0x3E" and I remember that battle not repeating. Would you agree it's some sort of complicated bug with "trainerbattle 0x3..."?
I wouldn't call it a bug, but I guess it just doesn't work with trainerbattle 0x3
Reply With Quote
  #5   Link to this post, but load the entire thread.  
Old February 20th, 2021 (10:14 PM).
Meister_anon~Master_o f_None Meister_anon~Master_o f_None is offline
 
Join Date: Dec 2020
Posts: 852
Sounds interesting, maybe I can use that as a simple way to make battles repeatable, without having to edit every script.
__________________
The A-non Team




Trevenant
Lv. 100 @ 306
Points: 70
Challenge: Souls of the Damned
Legendary: TBA

Chandelure
Lv. 100 @ 213
Points: 100
Challenge: N/A
Legendary: Entei

Rapidash
Lv. 100 @ 497
Points: 70
Challenge: N/A
Legendary: Entei

Flareon
Lv. 100 @ 708
Points: 70
Challenge: TBA
Legendary: TBA

Roselia
Lv. 100 @ 794
Points: 100
Challenge: TBA
Legendary: TBA

Entei
Hatch @ 793
Level 100 @ 1,018
Shiny: No
Points: 100

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