• 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!
  • Our weekly protagonist poll is now up! Vote for your favorite Trading Card Game 2 protagonist in the poll by clicking here.
  • 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.

[Eventing Question] How do i make an event that lowers a level to a selected pokemon

  • 3
    Posts
    5
    Years
    • Seen Jul 26, 2019
    I am trying to make an event that first allows you to select a live pokemon using pbChooseAblePokemon and then lower a level to the selected pokemon but i dont know how to do it.
    If someone could help me i would appreciate it.
     
    Try to check how RARECANDY works and put it to minus 1 instead plus 1 to level?
     
    I've tried with the following code, but I get an error and I do not know how to fix it

    poke=pbChooseAblePokemon(1,3)
    pbChangeLevel(poke,poke.level-1,scene)
    poke.calcStats



    Pokemon Essentials Esp v16.2
    ---------------------------
    Excepción: RuntimeError

    Mensaje: Script error within event 12, map 89 (Centro Pokémon):

    Exception: NoMethodError

    Message: (eval):2:in `pbExecuteScript'undefined method `level' for true:TrueClass

    ***Full script:

    poke=pbChooseAblePokemon(1,3)
    pbChangeLevel(poke,poke.level-1,scene)
    poke.calcStats


    Interpreter:243:in `pbExecuteScript'

    Interpreter:1606:in `eval'

    Interpreter:243:in `pbExecuteScript'

    Interpreter:1606:in `command_355'

    Interpreter:494:in `execute_command'

    Interpreter:193:in `update'

    Interpreter:106:in `loop'

    Interpreter:198:in `update'

    Scene_Map:103:in `update'

    Scene_Map:101:in `loop'



    Interpreter:276:in `pbExecuteScript'

    Interpreter:1606:in `command_355'

    Interpreter:494:in `execute_command'

    Interpreter:193:in `update'

    Interpreter:106:in `loop'

    Interpreter:198:in `update'

    Scene_Map:103:in `update'

    Scene_Map:101:in `loop'

    Scene_Map:114:in `update'

    Scene_Map:68:in `main'
     
    Code:
    poke=pbChooseAblePokemon(1,3)
    pbChangeLevel(poke,poke.level-1,scene)
    poke.calcStats


    Exception: NoMethodError
    Message: (eval):2:in `pbExecuteScript'undefined method `level' for true:TrueClass

    That error says that poke is a boolean (i.e. true/false), not a Pokémon. You might want to double-check how to use pbChooseAblePokemon, it must be storing the Pokémon elsewhere (i.e. rather than returning it).
     
    Back
    Top