- 44
- Posts
- 7
- Years
- Seen Oct 8, 2022
Is there a way to count how many gym badges the player currently has in Fire Red? I have looking into the script of the vicotry road guards and found the flags for (I assume) the badges. How would I generate a counter that counts if the player has, say, badge 1 and badge 5, and then does something because the user has 2 badges?
Code:
#org 0x1A796E
textcolor 0x0
applymovement 0x8009 0x81A75E7
waitmovement 0x0
copyvar 0x8000 0x4001
compare 0x8000 0x1
if 0x1 goto 0x81A79D8
compare 0x8000 0x2
if 0x1 goto 0x81A79E7a
compare 0x8000 0x3
if 0x1 goto 0x81A79F6
compare 0x8000 0x4
if 0x1 goto 0x81A7A05
compare 0x8000 0x5
if 0x1 goto 0x81A7A14
compare 0x8000 0x6
if 0x1 goto 0x81A7A23
compare 0x8000 0x7
if 0x1 goto 0x81A7A32
compare 0x8000 0x8
if 0x1 goto 0x81A7A41
end