• 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 Trading Card Game 2 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.

Trainer Gender Select for Essentials

venom12

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

    https://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
     
    you are a really genius (: definitive im going to use this! Thanks venom C:
     
    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.
     
    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