MOG Character Select Screen V1.3

3 de setembro de 2014
MOG Character Select Screen V1.3

MOG Character Select Screen é um modelo de script para criar tela de seleção de personagens para o RPG Maker XP desenvolvido pelo Moghunter.

Em outras palavras, é permite que você baseie nas técnicas de programação deste script e adapte ao seu jogo, da forma que você quiser. Também é interessante para se aprender mais sobre RGSS.

MOG Character Select Screen

Instalação

Baixe a demo que já possui os scripts e as pictures de exemplo.

O código abaixo deve ser adicionado acima do Main:

#_________________________________________________
# MOG_Character Select Screen V1.3          
#_________________________________________________
# By Moghunter  
# http://www.atelier-rgss.com
#_________________________________________________
module MOG
#Transition Type(Name).  
CSTR = "006-Stripe02"  
end

#===============================================================================
# Game_Actor
#===============================================================================
class Win_Char < Window_Selectable
#--------------------------------------------------------------------------
# Initialize
#--------------------------------------------------------------------------  
  def initialize
    super(-600, 0, 150, 150)
    @column_max = 2
    self.opacity = 0
    refresh    
    self.index = 1
    self.visible = false
  end
#--------------------------------------------------------------------------
# Refresh
#--------------------------------------------------------------------------
  def refresh
    if self.contents != nil
      self.contents.dispose
      self.contents = nil
    end
    @item_max = 8
  end  
end

#===============================================================================
# Scene_Char
#===============================================================================
class Scene_Char
#--------------------------------------------------------------------------
# Main
#--------------------------------------------------------------------------
  def main
    @command_window = Win_Char.new
    @command_window.back_opacity = 0
    @command_window.visible = false
    @command_window.index = 0    
    @back = Plane.new
    @back.bitmap = RPG::Cache.picture("MN_BK")
    @back.z = 10
    @char_back = Sprite.new
    @char_back.bitmap = RPG::Cache.picture("CH_Menu0")
    @char_back.z = 20
    @char_back.opacity = 0
    @char_sel = Sprite.new
    @char_sel.bitmap =  RPG::Cache.picture("CH_ID1")
    @char_sel.z = 100
    @char_sel.opacity = 0
    @char_name = Sprite.new
    @char_name.bitmap = RPG::Cache.battler("001-Fighter01",0)
    @char_name.z = 100
    @char_name.x = -300
    @char_name.y = 180    
    @char_name.opacity = 0
    @fundo6 = Plane.new
    @fundo6.bitmap = RPG::Cache.fog("Fog01",0)
    @fundo6.blend_type = 1
    @fundo6.z = 15
    @fundo6.opacity = 200   
    actor = $data_actors[1]
    @name = Sprite.new
    @name.bitmap = Bitmap.new(200,100)
    @name.bitmap.font.size = 48
    @name.bitmap.font.bold = false
    @name.bitmap.font.name = "Georgia"
    @name.color.set(0,0,0)    
    @name.x = 100
    @name.y = 500
    @name.z = 9998
    @name.color.set(0,0,0,255)
    @name.bitmap.draw_text(2, 22, 160, 64, actor.name.to_s)
    @name2 = Sprite.new
    @name2.bitmap = Bitmap.new(160,100)
    @name2.bitmap.font.size = 48
    @name2.bitmap.font.bold = false
    @name2.bitmap.font.name = "Georgia"
    @name2.color.set(0,0,0)    
    @name2.x = 102
    @name2.y = 502
    @name2.z = 9998
    @name2.color.set(55,200,255,255)
    @name2.bitmap.draw_text(2, 22, 160, 64, actor.name.to_s)
    Graphics.transition(60, "Graphics/Transitions/" + MOG::CSTR,1)
    loop do
      Graphics.update
      Input.update
      update
       if $scene != self
         break
       end 
    end
    for i in 1..50
      @char_back.zoom_x += 0.01
      @char_back.opacity -= 10
      @char_back.x -= 5
      @char_name.x -= 3
      @char_name.y -= 3
      @char_name.zoom_x += 0.02
      @char_name.zoom_y += 0.02    
      @char_name.opacity -= 7
      @char_sel.opacity -= 10
      @char_sel.zoom_x += 0.01
      @char_sel.opacity -= 10
      @char_sel.x -= 5
      @name.opacity -= 10
      @name2.opacity -= 10    
      Graphics.update  
    end
    Graphics.freeze
    @command_window.dispose
    @back.dispose
    @char_back.dispose
    @char_sel.dispose
    @char_name.dispose
    @fundo6.dispose
    @name.dispose
    @name2.dispose
    $game_map.autoplay
  end

#--------------------------------------------------------------------------
# Update
#--------------------------------------------------------------------------
  def update
    @back.ox -= 1
    @fundo6.ox += 1
    @fundo6.oy += 1    
    @command_window.update    
    @char_back.opacity += 10
    @char_sel.opacity += 10
  if @char_name.x < 100
    @char_name.x += 20
    @char_name.opacity += 6
    @name.y -= 7
    @name.opacity += 6
    @name2.y -= 7
    @name2.opacity += 6       
  elsif @char_name.x >= 0  
    @char_name.x = 100
    @name.y = 370
    @name.opacity = 255
    @name2.y = 372
    @name2.opacity = 255
    @char_name.opacity = 255
    @char_back.opacity = 255
    @char_sel.opacity = 255
  end    
  case @command_window.index
  when 0
    actor = $data_actors[1]  
    @char_sel.bitmap =  RPG::Cache.picture("CH_ID1")
    @char_name.bitmap = RPG::Cache.battler("001-Fighter01",0)
    @name.bitmap.draw_text(2, 22, 160, 64, actor.name.to_s)    
    @name2.bitmap.draw_text(2, 22, 160, 64, actor.name.to_s)    
  when 1
    actor = $data_actors[2]
    @char_sel.bitmap =  RPG::Cache.picture("CH_ID2")
    @char_name.bitmap = RPG::Cache.battler("010-Lancer02",0)
    @name.bitmap.draw_text(2, 22, 160, 64, actor.name.to_s) 
    @name2.bitmap.draw_text(2, 22, 160, 64, actor.name.to_s)      
  when 2
    actor = $data_actors[3]      
    @char_sel.bitmap =  RPG::Cache.picture("CH_ID3")
    @char_name.bitmap = RPG::Cache.battler("013-Warrior01",0)   
    @name.bitmap.draw_text(2, 22, 160, 64, actor.name.to_s)  
    @name2.bitmap.draw_text(2, 22, 160, 64, actor.name.to_s)    
  when 3
    actor = $data_actors[4]      
    @char_sel.bitmap = RPG::Cache.picture("CH_ID4")
    @char_name.bitmap = RPG::Cache.battler("019-Thief04",0)
    @name.bitmap.draw_text(2, 22, 160, 64, actor.name.to_s)
    @name2.bitmap.draw_text(2, 22, 160, 64, actor.name.to_s)        
  when 4
    actor = $data_actors[5]      
    @char_sel.bitmap = RPG::Cache.picture("CH_ID5")
    @char_name.bitmap = RPG::Cache.battler("008-Fighter08",0)
    @name.bitmap.draw_text(2, 22, 160, 64, actor.name.to_s) 
    @name2.bitmap.draw_text(2, 22, 160, 64, actor.name.to_s)      
  when 5
    actor = $data_actors[6]      
    @char_sel.bitmap = RPG::Cache.picture("CH_ID6")  
    @char_name.bitmap = RPG::Cache.battler("023-Gunner01",0)
    @name.bitmap.draw_text(2, 22, 160, 64, actor.name.to_s)  
    @name2.bitmap.draw_text(2, 22, 160, 64, actor.name.to_s)     
  when 6
    actor = $data_actors[7]      
    @char_sel.bitmap = RPG::Cache.picture("CH_ID7")  
    @char_name.bitmap = RPG::Cache.battler("029-Cleric05",0)
    @name.bitmap.draw_text(2, 22, 160, 64, actor.name.to_s)
    @name2.bitmap.draw_text(2, 22, 160, 64, actor.name.to_s)    
  when 7
    actor = $data_actors[8]      
    @char_sel.bitmap =  RPG::Cache.picture("CH_ID8") 
    @char_name.bitmap = RPG::Cache.battler("038-Mage06",0)    
    @name.bitmap.draw_text(2, 22, 160, 64, actor.name.to_s)
    @name2.bitmap.draw_text(2, 22, 160, 64, actor.name.to_s)       
  end
  if Input.press?(Input.dir4)
    @char_name.x = -300
    @name.y = 500
    @name.opacity = 0
    @name2.y = 502
    @name2.opacity = 0
    @char_name.opacity = 0
    @name.bitmap.clear
    @name2.bitmap.clear
  end
  if Input.trigger?(Input::B)
    $scene = Scene_Title.new  
  end    
  if Input.trigger?(Input::C)
    Audio.se_play("Audio/SE/007-System07", 150,150)      
    case @command_window.index
    when 0 
      $game_party.add_actor(1)
    when 1      
      $game_party.add_actor(2)
    when 2
      $game_party.add_actor(3)
    when 3
      $game_party.add_actor(4)
    when 4
      $game_party.add_actor(5)
    when 5
      $game_party.add_actor(6)   
    when 6
      $game_party.add_actor(7)  
    when 7
      $game_party.add_actor(8)    
    end
      $scene = Scene_Map.new 
    end 
  end
end


$mog_rgss_char_select = true
site ou autor do arquivo Moghunter tamanho do arquivo 543KB licencaGrátis sistemas operacionais compativeisWindows 98/98SE/Me/2000/XP/Vista/7 Download

Deixe um comentário

  • Seja social e nos siga!

           
  • Páginas

  • Tags Especiais

  • Categorias

  • Parceiros

  • eXTReMe Tracker
    Copyright © 2001 - 2017 Gaming Room. Todos os Direitos Reservados - É expressamente proibida a reprodução total ou parcial deste site sem o consentimento dos autores.