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

Touch Screen Gender choosing

zingzags

PokemonGDX creator
  • 536
    Posts
    16
    Years
    Well I made this simple script because I liked how now you can use a touch screen to choose many things in the new pokemon games. Well I made this before, and now that i figured how to do a Cloth Changer I decided this script will become useless to me because I am going to release a Male a Female version of the game.

    Well Here goes:
    PHP:
    class SceneBG
      
    def pbUpdate
       pbUpdateSpriteHash(@sprites)
      end
     
      def pbEndScene
       pbDisposeSpriteHash(@sprites)
       @viewport.dispose
      end
      
      
      def pbStartScene
        @sprites={}
        @viewport=Viewport.new(0,0,Graphics.width, 660)
        @viewport.z=99999
        
        @sprites["bg"]=Sprite.new(@viewport)
        @sprites["bg"].bitmap = BitmapCache.load_bitmap("Graphics/Pictures/Menubg_white")
        @sprites["bg"].x=0
        @sprites["bg"].y=340
        @sprites["bg"].z=0
        
        @sprites["2"]=Sprite.new(@viewport)
        @sprites["2"].bitmap = BitmapCache.load_bitmap("Graphics/Pictures/MaleTrainer")
        @sprites["2"].x=75
        @sprites["2"].y=420
        @sprites["2"].z=1
        
        @sprites["3"]=Sprite.new(@viewport)
        @sprites["3"].bitmap = BitmapCache.load_bitmap("Graphics/Pictures/FemaleTrainer")
        @sprites["3"].x=200
        @sprites["3"].y=420
        @sprites["3"].z=1
        #Kernel.pbMessage(_INTL("Are you a Boy or Girl."))
      end 
      
      def pbScene
      loop do
        Graphics.update
        Input.update
        pbUpdate
        
       #  Kernel.pbMessage(_INTL("There are three pokemon here, each one of these red ball, or PokeBall contains one Pokemon."))
        # Kernel.pbMessage(_INTL("Please choose your starting pokemon that you will journey out with."))
         if Mouse.mouse_in_area?(75, 420, 160, 160)
          if Mouse.click?(1)
          pbPlayDecisionSE()
          if !Kernel.pbConfirmMessageSerious(
             _INTL("Are you sure you are a boy it does not seem like it"))
             Kernel.pbMessage(_INTL("Ohh, it was a costume."))
           else
              Kernel.pbMessage(_INTL("Ohh, it was a costume."))
              Kernel.pbChangePlayer(0)
              break
            end
          end
        end
        
         
     if Mouse.mouse_in_area?(200, 420, 160, 160)
           if Mouse.click?(1)
          pbPlayDecisionSE()
          if !Kernel.pbConfirmMessageSerious(
             _INTL("Are you sure you are a girl it does not seem like it"))
             Kernel.pbMessage(_INTL("Ohh, it was a costume."))
           else
              Kernel.pbMessage(_INTL("Ohh, it was a costume."))
              Kernel.pbChangePlayer(1)
              break
            end
          end
        end
        
      
       
    
        
    
      end
    end
    end
    
    class BGScreen
     def initialize(scene)
      @scene = scene
     end
     def pbStartScreen
      @scene.pbStartScene
      @scene.pbScene
      @scene.pbEndScene
     end
    end
    You script this inside a event, NPC or w.e.....

    Spoiler:

    scene=SceneBG.new
    screen=BGScreen.new(scene)
    screen.pbStartScreen

    All you need to do is change the pictures, and also this is compatable with CNG mouse, and dual screen system.

    Please give credits if using.
     
    Last edited:
    Oh nice zingzags, you're well on your way to become a rather skilled coder.
     
    Back
    Top