The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Creative Discussions > Game Development > Scripts & Tutorials
Sign Up Rules/FAQ Live Battle Blogs Mark Forums Read

Notices

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.


Advertise here

Reply
 
Thread Tools
  #1    
Old December 22nd, 2012, 06:26 AM
venom12's Avatar
venom12
Pokemon Crystal Rain Relased
 
Join Date: Sep 2006
Age: 23
Gender: Male
Nature: Adamant
Send a message via Windows Live Messenger to venom12

Advertise here
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
  #2    
Old December 22nd, 2012, 07:52 AM
yakoo
Unhatched Egg
 
Join Date: Jul 2010
Gender: Male
you are a really genius (: definitive im going to use this! Thanks venom C:
Reply With Quote
  #3    
Old December 22nd, 2012, 08:34 AM
carmaniac's Avatar
carmaniac
Where the pickle surprise at?
 
Join Date: Apr 2009
Location: England
Age: 19
Nature: Relaxed
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.
Reply With Quote
  #4    
Old December 22nd, 2012, 09:18 AM
WinterKirby's Avatar
WinterKirby
 
Join Date: Dec 2012
Age: 2
Gender: Male
Nature: Mild
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, 02:34 PM
tylerab01's Avatar
tylerab01
Pokemon AquaHarmony
 
Join Date: Apr 2009
Location: France
Gender: Male
Nature: Bold
This was the first thing @Carmaniac taught me how to script almost 3 years ago XD
__________________

Reply With Quote
Reply
Quick Reply

Sponsored Links


Advertise here
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
Minimum Characters Per Post: 25



All times are UTC -8. The time now is 04:09 AM.


Style by Nymphadora, artwork by Sa-Dui.
Like our Facebook Page Follow us on Twitter © 2002 - 2014 The PokéCommunity™, pokecommunity.com.
Pokémon characters and images belong to The Pokémon Company International and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company or The Pokémon Company International. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2014 The PokéCommunity / PokéCommunity.com.
PokéCommunity™ is a trademark of The PokéCommunity. All rights reserved. Sponsor advertisements do not imply our endorsement of that product or service. User generated content remains the property of its creator.