Scripts & Tutorials This forum is for scripts and code, as well as all kinds of tutorials, software, tools and so forth. Remember to give credit!
The thread revival limit does not apply here.

TrollandToad.com
Reply
 
Thread Tools
  #1    
Old December 22nd, 2012 (6:26 AM).
venom12's Avatar
venom12 venom12 is offline
Pokemon Crystal Rain Relased
     
    Join Date: Sep 2006
    Age: 26
    Gender: Male
    Nature: Adamant
    Posts: 529
    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
    Reply With Quote

    Relevant Advertising!

      #2    
    Old December 22nd, 2012 (7:52 AM).
    yakoo yakoo is offline
       
      Join Date: Jul 2010
      Gender: Male
      Posts: 5
      you are a really genius (: definitive im going to use this! Thanks venom C:
      Reply With Quote
        #3    
      Old December 22nd, 2012 (8:34 AM).
      carmaniac's Avatar
      carmaniac carmaniac is offline
      Where the pickle surprise at?
         
        Join Date: Apr 2009
        Location: England
        Age: 22
        Nature: Relaxed
        Posts: 682
        Quote:
        Originally Posted by yakoo View Post
        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.
        __________________

        Pokémon: Lost Souls.







        Developed by Carmaniac.


        Quote:
        Originally Posted by Luka S.J. View Post
        My balls seem to be fine.
        Reply With Quote
          #4    
        Old December 22nd, 2012 (9:18 AM).
        WinterKirby's Avatar
        WinterKirby WinterKirby is offline
           
          Join Date: Dec 2012
          Age: 5
          Gender: Male
          Nature: Mild
          Posts: 152
          Quote:
          Originally Posted by carmaniac View Post
          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.
          Reply With Quote
            #5    
          Old December 22nd, 2012 (2:34 PM).
          tylerab01's Avatar
          tylerab01 tylerab01 is offline
          Pokemon AquaHarmony
             
            Join Date: Apr 2009
            Location: France
            Gender: Male
            Nature: Bold
            Posts: 165
            This was the first thing @Carmaniac taught me how to script almost 3 years ago XD
            __________________

            Reply With Quote
            Reply

            Quick Reply

            Join the conversation!

            Create an account to post a reply in this thread, participate in other discussions, and more!

            Create a PokéCommunity Account

            Sponsored Links
            Thread Tools

            Posting Rules
            You may not post new threads
            You may not post replies
            You may not post attachments
            You may not edit your posts

            BB code is On
            Smilies are On
            [IMG] code is On
            HTML code is Off

            Forum Jump


            All times are GMT -8. The time now is 6:01 AM.