- 961
- Posts
- 8
- Years
- Age 22
- Seen Nov 28, 2022
I know most things about Ruby, but since Ruby is for text, sprites and things like that are what I'm struggling with.
I was trying to create a new Pause menu, built off of this script: https://www.pokecommunity.com/showthread.php?t=344875
I started off trying to create the sprites this way for the menu (Above Main):
Is there anything already wrong here? This is giving me the following error:
The main question I'm having is this: How can I easily add a sprite which I can toggle visible=true or false? I'm trying to create a custom pause menu, but it's turning out to be incredibly difficult with all these errors. If someone who knows their code well, please hook me up or post below.
I was trying to create a new Pause menu, built off of this script: https://www.pokecommunity.com/showthread.php?t=344875
I started off trying to create the sprites this way for the menu (Above Main):
Code:
class PokemonMenu_Scene
def pbStartScene
@MenuScene=1
pbSetViableDexes
@viewport=Viewport.new(0,0,Graphics.width,Graphics.height)
@viewport.z=99999
@sprites={}
@sprites["slots"]=IconSprite.new(0,0,@viewport)
@sprites["slots"].setBitmap("Graphics/Pictures/CustomMenu/slots")
@sprites["panel1full"]=IconSprite.new(0,0,@viewport)
@sprites["panel1full"].setBitmap("Graphics/Pictures/CustomMenu/panel1full")
end
end
Code:
Exception: NoMethodError
Message: undefined method `viewport=' for nil:NilClass
PScreen_PauseMenu:5:in `pbShowCommands'
PScreen_PauseMenu:145:in `pbStartPokemonMenu'
PScreen_PauseMenu:144:in `loop'
PScreen_PauseMenu:270:in `pbStartPokemonMenu'
Scene_Map:192:in `call_menu'
Autosave:131:in `update'
Scene_Map:67:in `main'
Scene_Map:64:in `loop'
Scene_Map:71:in `main'
Main:49:in `mainFunctionDebug'
The main question I'm having is this: How can I easily add a sprite which I can toggle visible=true or false? I'm trying to create a custom pause menu, but it's turning out to be incredibly difficult with all these errors. If someone who knows their code well, please hook me up or post below.
Last edited by a moderator: