- 18
- Posts
- 3
- Years
- Seen Mar 6, 2025
So I tried doing something similar to make the pokemon give a random berry each day, but the only thing that happens is the pokemon's cry gets played and that's it. No berry, no crashing, just like I didn't change anything at all. Any idea how to make it work?Yes you can. The script place a pokemon cry when you interact with an pokemon. You can replace that in the script code with your functionality.
Search for
in the script code and put in the code for the menu you want to open when interacting.Code:def pbPlayCryOnOverworld(pokemon,form=0,volume=30,pitch=100) # default volume=90 return if !pokemon || pitch <= 0 form = 0 if form==nil if pokemon.is_a?(Pokemon) if !pokemon.egg? GameData::Species.play_cry_from_pokemon(pokemon,volume,pitch) end else GameData::Species.play_cry_from_species(pokemon,form,volume,pitch) end end
See in UI section of the the pokemon essentials code to see how the default menu does it and learn how to reproduce it.Code:def pbPlayCryOnOverworld(pokemon,form=0,volume=30,pitch=100) # put the pokemon menu effect you want to open here end