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 November 29th, 2010, 07:25 PM
zingzags's Avatar
zingzags
Creator or Pokemon Serenity
 
Join Date: Jan 2009
Location: Boston
Age: 20
Nature: Adamant

Advertise here
Well I made this simple script because I liked how now you can use a touch screen to choose many things in the new pokemon games. Well I made this before, and now that i figured how to do a Cloth Changer I decided this script will become useless to me because I am going to release a Male a Female version of the game.

Well Here goes:
PHP Code:
class SceneBG
  
def pbUpdate
   pbUpdateSpriteHash
(@sprites)
  
end
 
  def pbEndScene
   pbDisposeSpriteHash
(@sprites)
   @
viewport.dispose
  end
  
  
  def pbStartScene
    
@sprites={}
    @
viewport=Viewport.new(0,0,Graphics.width660)
    @
viewport.z=99999
    
    
@sprites["bg"]=Sprite.new(@viewport)
    @
sprites["bg"].bitmap BitmapCache.load_bitmap("Graphics/Pictures/Menubg_white")
    @
sprites["bg"].x=0
    
@sprites["bg"].y=340
    
@sprites["bg"].z=0
    
    
@sprites["2"]=Sprite.new(@viewport)
    @
sprites["2"].bitmap BitmapCache.load_bitmap("Graphics/Pictures/MaleTrainer")
    @
sprites["2"].x=75
    
@sprites["2"].y=420
    
@sprites["2"].z=1
    
    
@sprites["3"]=Sprite.new(@viewport)
    @
sprites["3"].bitmap BitmapCache.load_bitmap("Graphics/Pictures/FemaleTrainer")
    @
sprites["3"].x=200
    
@sprites["3"].y=420
    
@sprites["3"].z=1
    
#Kernel.pbMessage(_INTL("Are you a Boy or Girl."))
  
end 
  
  def pbScene
  loop 
do
    
Graphics.update
    Input
.update
    pbUpdate
    
   
#  Kernel.pbMessage(_INTL("There are three pokemon here, each one of these red ball, or PokeBall contains one Pokemon."))
    # Kernel.pbMessage(_INTL("Please choose your starting pokemon that you will journey out with."))
     
if Mouse.mouse_in_area?(75420160160)
      if 
Mouse.click?(1)
      
pbPlayDecisionSE()
      if !
Kernel.pbConfirmMessageSerious(
         
_INTL("Are you sure you are a boy it does not seem like it"))
         
Kernel.pbMessage(_INTL("Ohh, it was a costume."))
       else
          
Kernel.pbMessage(_INTL("Ohh, it was a costume."))
          
Kernel.pbChangePlayer(0)
          break
        
end
      end
    end
    
     
 
if Mouse.mouse_in_area?(200420160160)
       if 
Mouse.click?(1)
      
pbPlayDecisionSE()
      if !
Kernel.pbConfirmMessageSerious(
         
_INTL("Are you sure you are a girl it does not seem like it"))
         
Kernel.pbMessage(_INTL("Ohh, it was a costume."))
       else
          
Kernel.pbMessage(_INTL("Ohh, it was a costume."))
          
Kernel.pbChangePlayer(1)
          break
        
end
      end
    end
    
  
   

    

  end
end
end

class BGScreen
 def initialize
(scene)
  @
scene scene
 end
 def pbStartScreen
  
@scene.pbStartScene
  
@scene.pbScene
  
@scene.pbEndScene
 end
end 
You script this inside a event, NPC or w.e.....

Spoiler:



scene=SceneBG.new
screen=BGScreen.new(scene)
screen.pbStartScreen

All you need to do is change the pictures, and also this is compatable with CNG mouse, and dual screen system.

Please give credits if using.
__________________
Pokemon Serenity is my fangame name.
name decided 12/15/09
Currently helping:
Pokemon ebony
and
Xenotime:

Last edited by zingzags; November 30th, 2010 at 01:03 PM.
Reply With Quote
  #2    
Old November 29th, 2010, 11:57 PM
carmaniac's Avatar
carmaniac
Where the pickle surprise at?
 
Join Date: Apr 2009
Location: England
Age: 19
Nature: Relaxed
Oh nice zingzags, you're well on your way to become a rather skilled coder.
__________________

Pokémon: Lost Souls.







Developed by Carmaniac.
Reply With Quote
  #3    
Old November 30th, 2010, 07:42 AM
zingzags's Avatar
zingzags
Creator or Pokemon Serenity
 
Join Date: Jan 2009
Location: Boston
Age: 20
Nature: Adamant
Thanks bro :D,
Well I came back about two nights ago.
And just thought of something then Pop....
LOL

you still got me on MSN?

added screenies:


__________________
Pokemon Serenity is my fangame name.
name decided 12/15/09
Currently helping:
Pokemon ebony
and
Xenotime:

Last edited by zingzags; November 30th, 2010 at 01:02 PM. Reason: Your double post has been automatically merged.
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 06:34 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.