The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Fan Games > Binary ROM Hacking
Reload this Page Script FR: Trainerbattle 0x3 weird results on loss

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 June 1st, 2018 (11:07 AM). Edited June 1st, 2018 by Sakakii.
Sakakii's Avatar
Sakakii Sakakii is offline
 
Join Date: Nov 2017
Posts: 242
I'm using trainerbattle 0x3 in an event and the problem is, if you lose the battle, when you return to the area to do the event again, the person there is gone.

This is really weird to me because the flag used for that person should not be set unless the script runs all the way to the end, which should only happen if the player wins.

I think I don't have enough knowledge on trainerbattle 0x3 or something, this is used in Elite Four which uses a bunch of vars and specials and I have no idea what those really do...

I can also do trainerbattle 0x1, but the problem is, this produces glitchy effects if the player tries to use their bike after the battle, most likely because trainerbattle 0x1 in orignal fire red was only used for in-door gym battles.

Well, does anyone know what to do in this situation?

Basically all I want is an outdoor event like this: talk to a person - things happen - a trainerbattle commences - win the battle and finish the event, or lose the battle and re-do the event.
Reply With Quote
  #2   Link to this post, but load the entire thread.  
Old June 4th, 2018 (3:04 AM).
Thoriére's Avatar
Thoriére Thoriére is offline
If everything's a dream, don't wake me.
 
Join Date: Aug 2014
Location: GMT -8:00
Gender: Male
Nature: Serious
Posts: 121
Quote:
Originally Posted by Sakakii View Post
I'm using trainerbattle 0x3 in an event and the problem is, if you lose the battle, when you return to the area to do the event again, the person there is gone.

I can also do trainerbattle 0x1, but the problem is, this produces glitchy effects if the player tries to use their bike after the battle, most likely because trainerbattle 0x1 in orignal fire red was only used for in-door gym battles.

Basically all I want is an outdoor event like this: talk to a person - things happen - a trainerbattle commences - win the battle and finish the event, or lose the battle and re-do the event.
Like you said, the fact that you're using 0x3 or 0x1 is likely what's causing the issue. You should really be using 0x0, as this is the designation used for ordinary trainerbattles. Since you didn't include your script in the post, I can't proofread it for you, but I can give you an example of a script I wrote that should work and you can draw your fixes from that.

Spoiler:
Code:
#dynamic 0x800000

#org @scriptstart
trainerbattle 0x0 0x1 0x0 @battlebegin @playervictory
msgbox @postbattle 0x6
end

#org @battlebegin
= You dare to challenge me?

#org @playervictory
= Whaaaaaaat?!

#org @postbattle
= Your Pok\h1Bmon must really love\nyou.


Let me know if the problem persists.
__________________
pokéfarm + tumblr + pinterest + pair
New to ROM hacking? Click here!
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.