• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

[Script] FR: Trainerbattle 0x3 weird results on loss

  • 242
    Posts
    6
    Years
    • Seen Apr 3, 2023
    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.
     
    Last edited:

    Thoriére

    [i]If everything's a dream, don't wake me.[/i]
  • 121
    Posts
    9
    Years
    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:

    Let me know if the problem persists.
     
    Back
    Top