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

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

3
Posts
4
Years
  • Age 26
  • 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.
 

WolfPP

Spriter/ Pixel Artist
1,309
Posts
5
Years
Try to check how RARECANDY works and put it to minus 1 instead plus 1 to level?
 
3
Posts
4
Years
  • Age 26
  • Seen Jul 26, 2019
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'
 
1,403
Posts
10
Years
  • Seen Apr 18, 2024
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