- Lo que temenos que hacer es insertar este script:
class SceneBG
def pbUpdate
Mouse.update
$mouse.x = Mouse.pos_x
$mouse.y = Mouse.pos_y
pbUpdateSpriteHash(@sprites)
end
def pbEndScene
pbDisposeSpriteHash(@sprites)
@viewport.dispose
end
def pbStartScene
@sprites={}
@viewport=Viewport.new(0,0,Graphics.width, 660)
@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("Eres Chico o Chica?."))
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?(75, 420, 160, 160)
if Mouse.click?(1)
pbPlayDecisionSE()
if !Kernel.pbConfirmMessageSerious(
_INTL("¿Seguro que eres un Chico?"))
Kernel.pbMessage(_INTL("Entonces que eres?"))
else
Kernel.pbMessage(_INTL("Ok!"))
Kernel.pbChangePlayer(0)
break
end
end
end
if Mouse.mouse_in_area?(200, 420, 160, 160)
if Mouse.click?(1)
pbPlayDecisionSE()
if !Kernel.pbConfirmMessageSerious(
_INTL("¿Segura que eres una Chica?"))
Kernel.pbMessage(_INTL("Entonces que eres?"))
else
Kernel.pbMessage(_INTL("Ok!"))
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
def pbUpdate
Mouse.update
$mouse.x = Mouse.pos_x
$mouse.y = Mouse.pos_y
pbUpdateSpriteHash(@sprites)
end
def pbEndScene
pbDisposeSpriteHash(@sprites)
@viewport.dispose
end
def pbStartScene
@sprites={}
@viewport=Viewport.new(0,0,Graphics.width, 660)
@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("Eres Chico o Chica?."))
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?(75, 420, 160, 160)
if Mouse.click?(1)
pbPlayDecisionSE()
if !Kernel.pbConfirmMessageSerious(
_INTL("¿Seguro que eres un Chico?"))
Kernel.pbMessage(_INTL("Entonces que eres?"))
else
Kernel.pbMessage(_INTL("Ok!"))
Kernel.pbChangePlayer(0)
break
end
end
end
if Mouse.mouse_in_area?(200, 420, 160, 160)
if Mouse.click?(1)
pbPlayDecisionSE()
if !Kernel.pbConfirmMessageSerious(
_INTL("¿Segura que eres una Chica?"))
Kernel.pbMessage(_INTL("Entonces que eres?"))
else
Kernel.pbMessage(_INTL("Ok!"))
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
- Para mostrarlo tenemos que hacer una llamada a script pondremos esto:
screen=BGScreen.new(scene)
screen.pbStartScreen
Tan solo cambien los gráficos a su gusto
Y listo :D
Creditos:
zingzags - Script