• 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.

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

63
Posts
9
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
     

    Zeak6464

    Zeak #3205 - Discord
    1,101
    Posts
    11
    Years
  • 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
     
    63
    Posts
    9
    Years
    • Seen Aug 15, 2017
    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
     

    venom12

    Pokemon Crystal Rain Relased
    476
    Posts
    17
    Years
    • Age 33
    • Seen Dec 28, 2023
    Should be
    Code:
    commands[cmdTrainer=commands.length]=$Trainer.name if $game_switches[99]==true
     
    Last edited:
    63
    Posts
    9
    Years
    • Seen Aug 15, 2017
    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:

    Savordez

    It's time to end fangames.
    115
    Posts
    10
    Years
  • 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)
     
    63
    Posts
    9
    Years
    • Seen Aug 15, 2017
    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