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

Screen staying black when opening menu in Pokégear

66
Posts
6
Years
    • Seen May 2, 2020
    Okay so I've made an option in the Pokégear to go to the global trade station. When i select the button it changes the BGM and all the functions work however you can't see the actual screen. The whole screen is black and you're basically blinded until you exit from the GTS where then you can see the Pokégear options again.
    Here's my code for the Pokégear:
    Code:
    elsif cmdGts>=0 && cmd==cmdGts
            pbPlayDecisionSE
            pbFadeOutIn(99999){
              pbBGMPlay("Trade Resort - Brick Bronze OST")
              scene = Scene_GTS.new
              scene.main
            }
    And this is the code for the GTS:
    Code:
    class GTSSearchMethod
      def initialize
        @exit = false
        @index = 0
      end
    
      def create_spriteset
        pbDisposeSpriteHash(@sprites) if @sprites
        @sprites = {}
        @sprites["background"] = IconSprite.new
        @sprites["background"].setBitmap("Graphics/Pictures/GTS/Background")
    
        pbSetSystemFont(@sprites["background"].bitmap)
        textpos=[
          ["Select Search Method",50,6,0,Color.new(248,248,248),Color.new(40,40,40)],
          ["          Online ID: #{$PokemonGlobal.onlineID}",350,6,2,Color.new(248,248,248),
          Color.new(40,40,40)],
        ]
        pbDrawTextPositions(@sprites["background"].bitmap,textpos)
    
        @sprites["0"] = GTS_Button.new(Graphics.width/2, 50, "By Wanted")
        @sprites["0"].x -= @sprites["0"].bitmap.width / 2
    
        @sprites["1"] = GTS_Button.new(Graphics.width/2, 110, "By Pokémon")
        @sprites["1"].x -= @sprites["1"].bitmap.width / 2
    
        @sprites["2"] = GTS_Button.new(Graphics.width/2, 170, "By ID")
        @sprites["2"].x -= @sprites["2"].bitmap.width / 2
    
        @sprites["3"] = GTS_Button.new(Graphics.width/2, 230, "Exit")
        @sprites["3"].x -= @sprites["3"].bitmap.width / 2
    
        bit = Bitmap.new("Graphics/Pictures/GTS/Select")
        @sprites["selection_l"] = IconSprite.new
        @sprites["selection_l"].bitmap = Bitmap.new(16, 46)
        @sprites["selection_l"].bitmap.blt(0, 0, bit, Rect.new(0, 0, 16, 16))
        @sprites["selection_l"].bitmap.blt(0, 23, bit, Rect.new(0, 16, 16, 32))
    
        @sprites["selection_r"] = IconSprite.new
        @sprites["selection_r"].bitmap = Bitmap.new(16, 46)
        @sprites["selection_r"].bitmap.blt(0, 0, bit, Rect.new(16, 0, 32, 16))
        @sprites["selection_r"].bitmap.blt(0, 23, bit, Rect.new(16, 16, 32, 32))
    
        @sprites["selection_l"].x = @sprites["#{@index}"].x-2
        @sprites["selection_l"].y = @sprites["#{@index}"].y-2
        @sprites["selection_r"].x = @sprites["#{@index}"].x+
        @sprites["#{@index}"].bitmap.width-18
        @sprites["selection_r"].y = @sprites["#{@index}"].y-2
    
        pbFadeInAndShow(@sprites) { update }
      end
      
      def main
        create_spriteset
        Graphics.transition
        loop do
          Graphics.update
          Input.update
          update
          break if @exit
        end
        Graphics.freeze
        pbDisposeSpriteHash(@sprites)
      end
     
    Back
    Top