• 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.
  • Our friends from the Johto Times are hosting a favorite Pokémon poll - and we'd love for you to participate! Click here for information on how to vote for your favorites!
  • 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.

Not showing the Trainer Card in the pause menu until being given it

  • 63
    Posts
    10
    Years
    • Seen Aug 15, 2017
    Can the Trainer Card be set to be given in a similar way as the Pokedex in that it won't appear in the menu until the player has received it? and if so, can anyone help point me in the right direction please? I'm looking through the Script Editor to see if I can work it out, but not having much luck.

    Thanks in advance,

    LexxiLion
     
    PScreen_PauseMenu

    Change :
    commands[cmdTrainer=commands.length]=$Trainer.name

    To:
    commands[cmdTrainer=commands.length]=$Trainer.name if [variable] == on

    [variable] could be 99
    If 99 is on then you will see Trainer Card become available in the Pause Menu
     
    PScreen_PauseMenu

    Change :
    commands[cmdTrainer=commands.length]=$Trainer.name

    To:
    commands[cmdTrainer=commands.length]=$Trainer.name if [variable] == on

    [variable] could be 99
    If 99 is on then you will see Trainer Card become available in the Pause Menu

    Tried this as
    commands[cmdTrainer=commands.length]=$Trainer.name if [99] == on

    This hides the Trainer name in the pause menu, but when I try to access the pause menu after running the event it comes up with an error message saying;

    Exception: NameError
    Message: undefined local variable or method 'on' for
    #<PokemonMenu:0x84d70f0
    PScreen_PauseMenu:199:in'pbStartPokemonMenu'
    Scene_Map:193:in'call_menu'
    Scene_Map:163:in'update'
    Scene_Map:68:in'main'
    Scene_Map:65:in'loop'
    Scene_Map:72:in'main'
    Main:49:in'mainFunctionDebug'
    Main:27:in'mainFunction'
    Main:27:in'pbCriticalCode'
    Main:27:in'mainFunction'

    Running the event, I've set:

    @>Control Variables: [0099: TrainerCardOn] = 0
     
    Should be
    Code:
    commands[cmdTrainer=commands.length]=$Trainer.name if $game_switches[99]==true
     
    Last edited:
    Thanks for the help both of you =] =] =]

    ok really sorry, but still doesn't show. In the event, I can only set constant to 0 or 1, not true. What have I missed there?
     
    Last edited by a moderator:
    You can't set a variable true or false. Either replace $game_variables[99] with $game_switches[99] and set switch ID 99 on, or change "true" to 1 (so you can use the variable no. 99)
     
    This issue is now resolved, with this being the correct solution:

    commands[cmdTrainer=commands.length]=$Trainer.name if $game_variables[99]==1

    Thanks Zeak6464 for the initial help, Venom12 for the follow-on advice and Savordez for the resolution.
     
    Back
    Top