Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #=====================================================================================
- # * Gender Selection Script for the Pokemon Essentials BW2 Mod made by shiney570.
- #
- # * What it will do:
- #
- # - create a scene, where the player can choose his gender.
- #
- # Tips:
- #
- # - if you don't want the intro background for this scene, you can erase the
- # background for this scene, if you set GENDERSELECTION_BG =false (in the
- # Settings Script).
- #
- #===================================================================================
- class PokemonGenderSelection
- def initialize
- @select=1; @close=0
- @viewport=Viewport.new(0,0,Graphics.width,Graphics.height)
- @viewport.z=99999
- @sprites={}
- @sprites["1"]=IconSprite.new(0,0,@viewport)
- @sprites["1"].setBitmap("Graphics/Pictures/GenderSelection/default")
- @sprites["2"]=IconSprite.new(0,0,@viewport)
- @sprites["2"].setBitmap("Graphics/Pictures/GenderSelection/boy_1")
- @sprites["2"].visible=false
- @sprites["3"]=IconSprite.new(0,0,@viewport)
- @sprites["3"].setBitmap("Graphics/Pictures/GenderSelection/boy_2")
- @sprites["3"].visible=false
- @sprites["4"]=IconSprite.new(0,0,@viewport)
- @sprites["4"].setBitmap("Graphics/Pictures/GenderSelection/girl_1")
- @sprites["4"].visible=false
- @sprites["5"]=IconSprite.new(0,0,@viewport)
- @sprites["5"].setBitmap("Graphics/Pictures/GenderSelection/girl_2")
- @sprites["5"].visible=false
- pbWait(10)
- Kernel.pbMessage("Are you a boy? Or a girl?")
- main_method
- end
- # Input method.
- def input
- if Input.trigger?(Input::LEFT) && (@select==1 || @select==4)
- @select=2
- end
- if Input.trigger?(Input::RIGHT) && (@select==1 || @select==2)
- @select=4
- end
- if Input.trigger?(Input::C)
- @select+=1
- for i in 1..5
- @sprites["#{i}"].visible = @select==i
- end
- self.continue
- end
- if defined?($mouse)
- if $mouse.leftClick?(@sprites["2"]) || $mouse.leftClick?(@sprites["4"])
- @select+=1
- for i in 1..5
- @sprites["#{i}"].visible = @select==i
- end
- self.continue
- end
- end
- end
- # Main Method
- def main_method
- while @close!=1
- Graphics.update
- Input.update
- for i in 1..5
- @sprites["#{i}"].visible = @select==i
- end
- input
- end
- end
- # Confirm method.
- def continue
- if @select==3
- pbWait(20)
- if Kernel.pbConfirmMessage("Eres chico ¿verdad?")
- pbChangePlayer(0)
- $game_switches[n] = false
- @close=1
- 20.times do
- @sprites["#{@select}"].opacity-= 12.75
- pbWait(1)
- end
- else
- @select=2
- end
- elsif @select==5
- pbWait(20)
- if Kernel.pbConfirmMessage("Eres chica ¿verdad?")
- pbChangePlayer(1)
- $game_switches[n] = true
- @close=1
- 20.times do
- @sprites["#{@select}"].opacity-= 12.75
- pbWait(1)
- end
- else
- @select=4
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement