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

Trainer Gender Select for Essentials

venom12

Pokemon Crystal Rain Relased
476
Posts
17
Years
    • Age 33
    • Seen Dec 28, 2023
    So here is my public scripts :) Gender Selection, on intro just call script "pbCallGenderSelect"

    http://dl.dropbox.com/u/4212314/gender.rar

    Code:
    class PokemonGenderSelectScene
    
    def update
     pbUpdateSpriteHash(@sprites)
    end
    
    def pbStartScene
    
     @sprites={}
     @select=0
     @viewport=Viewport.new(0,0,Graphics.width,Graphics.height)
     @viewport.z=99999
     @sprites["card"]=IconSprite.new(0,0,@viewport)
     @sprites["card"].setBitmap("Graphics/Pictures/charaselectbg")
     
     @sprites["boy"]=IconSprite.new(0,0,@viewport)
     @sprites["boy"].setBitmap("Graphics/Pictures/charaselect_boy")
     @sprites["boy"].opacity=180
     
     @sprites["girl"]=IconSprite.new(0,0,@viewport)
     @sprites["girl"].setBitmap("Graphics/Pictures/charaselect_girl")
     @sprites["girl"].opacity=180
     
     pbFadeInAndShow(@sprites) { update }
    end
    
    def pbEndScene
      pbFadeOutAndHide(@sprites) { update }
      pbDisposeSpriteHash(@sprites)
      @viewport.dispose
    end
    
      
        
    def pbGenderSelect
     loop do
      Graphics.update
      Input.update
      self.update
      
      case @select
      when 0
        @sprites["boy"].opacity=255
        @sprites["girl"].opacity=180
      when 1
       @sprites["boy"].opacity=180
       @sprites["girl"].opacity=255
     end
     
    if Input.trigger?(Input::RIGHT) and @select==0
     @select=1
    end
    
    if Input.trigger?(Input::LEFT) and @select==1
    @select=0
    end
    
    if Input.trigger?(Input::C)
    case @select
      when 0
      pbChangePlayer(0)
       #$game_variables[51]=0 #This is just if you want to activate a switch when you have other things for story
       $game_switches[320]=true #This is just if you want to activate a switch when you have other things for story
       break
      when 1
     pbChangePlayer(1)
      #$game_variables[51]=1 #This is just if you want to activate a switch when you have other things for story
       $game_switches[321]=true #This is just if you want to activate a switch when you have other things for story
       break
     end
    end
     end 
    end
    
    end
    
    class PokemonGenderSelect
    
    def initialize(scene)
     @scene=scene
    end
    
    def pbStartScreen
     @scene.pbStartScene
     @scene.pbGenderSelect
     @scene.pbEndScene
    end
    
    end
    
    def pbCallGenderSelect
        scene=PokemonGenderSelectScene.new
        screen=PokemonGenderSelect.new(scene)
        screen.pbStartScreen
    end
     
    5
    Posts
    13
    Years
    • Seen Apr 6, 2014
    you are a really genius (: definitive im going to use this! Thanks venom C:
     

    carmaniac

    Where the pickle surprise at?
    671
    Posts
    15
    Years
  • you are a really genius (: definitive im going to use this! Thanks venom C:

    It takes half a brain to make a script like this XD. Useful script though for those who don't know how to code. I guess.
     
    152
    Posts
    11
    Years
    • Seen May 11, 2015
    It takes half a brain to make a script like this XD. Useful script though for those who don't know how to code. I guess.

    Well, I don't know how to code yet. (I'll learn it when I need to use it.)
    However, I don't really see any point in which I'd need to use this at the moment.
     
    Back
    Top