The PokéCommunity Forums

The PokéCommunity Forums (https://www.pokecommunity.com/index.php)
-   Binary ROM Hacking (https://www.pokecommunity.com/forumdisplay.php?f=284)
-   -   Battle After Trainerbattle glitch (Fire Red) (https://www.pokecommunity.com/showthread.php?t=447393)

DaimyoHermit March 25th, 2021 8:03 AM

After Trainerbattle glitch (Fire Red)
 
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



Asith March 25th, 2021 9:05 AM

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)


All times are GMT -8. The time now is 9:12 AM.


Like our Facebook Page Follow us on Twitter © 2002 - 2018 The PokéCommunity™, pokecommunity.com.
Pokémon characters and images belong to The Pokémon Company International and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company or The Pokémon Company International. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2016 The PokéCommunity / PokéCommunity.com.
PokéCommunity™ is a trademark of The PokéCommunity. All rights reserved. Sponsor advertisements do not imply our endorsement of that product or service. User generated content remains the property of its creator.

Acknowledgements
Use of PokéCommunity Assets
vB Optimise by DragonByte Technologies Ltd © 2023.