• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Dawn, Gloria, Juliana, or Summer - which Pokémon protagonist is your favorite? Let us know by voting in our poll!
  • 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.

[Scripting Question] Enemy Trainer's Pokemon (names and HP) not displaying correctly

princessyiris

Banned
  • 34
    Posts
    5
    Years
    • Seen Feb 6, 2020
    [PokeCommunity.com] Enemy Trainer's Pokemon (names and HP) not displaying correctly

    [PokeCommunity.com] Enemy Trainer's Pokemon (names and HP) not displaying correctly

    I honestly have no idea what's causing this. It's only this one trainer where this is a problem, but I can't just remove him from the game because he's an important NPC.

    There's another strange piece to the puzzle. In my game, if you lose to him when you battle him, you can choose to rematch him later on. It calls the same trainer from the PBS, but it works fine in that case.
    [PokeCommunity.com] Enemy Trainer's Pokemon (names and HP) not displaying correctly


    Does anyone know what might be causing this?

    Event leading up to the main battle (the part that's broken):
    Spoiler:


    Event leading up to the rematch (the part that works fine):
    Spoiler:
     
    Solved!

    It was actually caused by something seemingly innocuous. A switch titled CutsceneHideNPC being ON.
    [PokeCommunity.com] Enemy Trainer's Pokemon (names and HP) not displaying correctly


    Originally, the switch would turn off at the end of the scene. Howeverm turning CutsceneHideNPC = OFF right before the battle causes the battle to work fine.
    [PokeCommunity.com] Enemy Trainer's Pokemon (names and HP) not displaying correctly


    I can't really explain why this is. Still, it's a possible solution for anyone else who might have this problem:
    If the scene right before a battle turns a switch on, consider turning that switch off right before the battle begins.
     
    Back
    Top