The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Fan Games > Binary ROM Hacking
Reload this Page Script After losing battle in scripted event, the event still completes wtf?

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 10th, 2018 (3:42 PM).
Sakakii's Avatar
Sakakii Sakakii is offline
 
Join Date: Nov 2017
Posts: 242
Ok so I have a script tile with this script attached (I left out text message and movement commands)
, what happens is, if you lose the battle and come back, the OW's are gone and the script tiles doesn't run again, which confuses me because the script is supposed to terminate once you faint right?
Meaning the setflag and setvar commands never should execute but it seems like they do anyways.

So yeah does anyone have experience with this lol for now I'll probably just separate the script into two parts where the story part happens on the script tile, and then you have to talk to the NPC for the battle.

Spoiler:
#org @start
lockall
msgbox @text 0x6
msgbox @text2 0x6
fadescreen 0x1
pause 0xA
fadescreen 0x0
applymovement 0x3 @faceright
applymovement 0xB @faceleft
waitmovement 0x0
msgbox @text3 0x6
applymovement 0x3 @facedown
applymovement 0xB @facedown
waitmovement 0x0
msgbox @text4 0x6
fadescreen 0x1
hidesprite 0x3
hidesprite 0xB
fadescreen 0x0
msgbox @text5 0x6
applymovement 0x9 @qst
waitmovement 0x0
msgbox @text6 0x6
applymovement 0x9 @silvermove
waitmovement 0x0
trainerbattle 0x3 0x51 0x0 @defeat
msgbox @text7 0x6
applymovement 0x1 @1move
waitmovement 0x0
applymovement 0x6 @2move
waitmovement 0x0
applymovement 0xC @3move
waitmovement 0x0
applymovement 0x9 @4move
waitmovement 0x0
msgbox @text8 0x6
applymovement 0x1 @5move
applymovement 0x6 @5move
applymovement 0xC @5move
applymovement 0x9 @5move
waitmovement 0x0
hidesprite 0x1
hidesprite 0x6
hidesprite 0xC
hidesprite 0x9
setflag 0x17E
setvar 0x4051 0x9
releaseall
end
__________________
Pokémon Kanlara Ultimate
Pokémon Kanlara Classic
Reply With Quote
  #2   Link to this post, but load the entire thread.  
Old August 12th, 2018 (10:57 AM).
Noodlewhiz's Avatar
Noodlewhiz Noodlewhiz is offline
 
Join Date: Apr 2017
Posts: 71
I couldn’t tell you why your script doesn’t rerun, but your overworlds are likely disappearing because of the hidesprite commands you have before the trainer battle. Hidesprite automatically sets the flag of whatever NPC it’s used on.
Reply With Quote
  #3   Link to this post, but load the entire thread.  
Old August 12th, 2018 (11:26 AM).
Sakakii's Avatar
Sakakii Sakakii is offline
 
Join Date: Nov 2017
Posts: 242
Here's the weird part, tho; the other OW's that I did not hide, they also dissapeared. But anyway I solved it, the solution is to not use any hidesprite command before a trainerbattle in a script like this.
__________________
Pokémon Kanlara Ultimate
Pokémon Kanlara Classic
Reply With Quote
  #4   Link to this post, but load the entire thread.  
Old August 22nd, 2018 (11:42 AM).
masterquestmq's Avatar
masterquestmq masterquestmq is offline
Enthusiastic Rom Hacker
 
Join Date: Nov 2010
Gender: Male
Posts: 193
If you want the script to terminate when you faint make sure it is trainerbattle 0x1
Reply With Quote
  #5   Link to this post, but load the entire thread.  
Old August 25th, 2018 (6:31 AM).
Alice20 Alice20 is offline
 
Join Date: Aug 2018
Posts: 2
I think the trainer battle type is the same type used when you battle Gary, after that, Professor oak encourages you and heals you pokemon and the game continues. You could use this script to make a defeat happen that's important to the plot (like in the first golden sun game). Set pokemon that the player can't beat at that level and point the win to the same place as the loss just incase... not that you were asking for that, but it's an interesting idea.
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:17 AM.