The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Fan Games > Binary ROM Hacking
Reload this Page Battle After Trainerbattle glitch (Fire Red)

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 March 25th, 2021 (8:03 AM).
DaimyoHermit's Avatar
DaimyoHermit DaimyoHermit is offline
G Rank
 
Join Date: Feb 2021
Location: Old Desert
Gender: Male
Nature: Impish
Posts: 59
So i was making this npc that spars the player everytime the player wants to. After the trainer battle the player's position is transported into the other person event and the sprite corrupts or something like this:

https://imgur.com/3CTiI1X

The script:
Code:
#dynamic 0x800000

#org @start
lock
faceplayer
checkflag 0x201
if 0x11 goto @start3
checkflag 0x200 
if 0x1 goto @start2
msgbox @talk1 0x5
compare LASTRESULT 0x1
if 0x1 goto @spar1
compare LASTRESULT 0x0
if 0x1 goto @no1
end

#org @no1
msgbox @no2 0x6
end

#org @no3
msgbox @noprob 0x6
end

#org @spar1
trainerbattle 0x1 0x2E4 0x0 @see @defeat @win1
end

#org @win1
lock
msgbox @ilose1 0x6
setflag 0x200
release
end

#org @start2
lock
faceplayer
msgbox @talk2 0x5
compare LASTRESULT 0x1
if 0x1 goto @spar2
compare LASTRESULT 0x0
if 0x1 goto @no1
end

#org @spar2
trainerbattle 0x1 0x2E3 0x0 @see @defeat @win2
end

#org @win2
lock
msgbox @ilose2 0x6
setflag 0x201
settrainerflag 0x2E3
release
end

#org @start3
msgbox @talk3 0x5
compare LASTRESULT 0x1
if 0x1 goto @spar3
compare LASTRESULT 0x0
if 0x1 goto @no3
release
end

#org @spar3
trainerbattle 0x1 0x2E3 0x0 @see @defeat @win3
end

#org @win3
msgbox @ilose3 0x6
fanfare 0x119
giveitem 0x136 0x1 0x0
waitfanfare
msgbox @item 0x6
settrainerflag 0x2E3
setflag 0x203
release
end

#org @start4
msgbox @talk3 0x5
compare LASTRESULT 0x1
if 0x1 goto @spar4
compare LASTRESULT 0x0
if 0x1 goto @no3
release
end

#org @spar4
trainerbattle 0x1 0x2E3 0x0 @see @defeat @win4
end

#org @win4
msgbox @ilose4 0x6
settrainerflag 0x2E3
release
end
Reply With Quote
  #2   Link to this post, but load the entire thread.  
Old March 25th, 2021 (9:05 AM).
Asith's Avatar
Asith Asith is offline
Uwao
 
Join Date: Nov 2020
Posts: 204
Didn't check your script, but before that, is the npc's movement type set to look down by any chance? One of the look down bytes in advance is notoriously bugged and causes problems like this. If so, change it to the other look down byte (can't remember which is which right now)
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:12 AM.