Creado por: DEMYX09
Version: 0.8
Video:
http://www.youtube.com/watch?v=HwuoOsYL7V0
Información:
Script que simula el title del jeugo final fantasy 4 .
proximas actualizaciones:
Fondo cambia de color
Como usar:
-pegar sobre MAIN
-Importar las imagenes correspondientes una nueva carpeta GRAFIC\FTitle
Version: 0.8
Video:
http://www.youtube.com/watch?v=HwuoOsYL7V0
Información:
Script que simula el title del jeugo final fantasy 4 .
proximas actualizaciones:
Fondo cambia de color
Como usar:
-pegar sobre MAIN
-Importar las imagenes correspondientes una nueva carpeta GRAFIC\FTitle
Imagen necesaria:
actualizado version 0.8
-ya no habra title no es necesario
-corregido todos los erres
-ahora se puede mover el trio de imagenes
Script:
Código:
#==============================================================================
#==============================================================================
#FF4 title
#Credits:Demyx09
# Web:http://gamefactory.forogratuito.net/
#Version: 0.8
#Necesitan imagenes en una nueva carpeta GRAFIC\FTitle con los nombres:
#FF4NewGame
#FF4Fin
#FF4Continuar
#Cursor
#==============================================================================
#==============================================================================
module Demyx09
#==============================================================================
COMMANS_X = 210 # <cordenadas horizontales del trio de imagenes (nuevo jeugo,continue,findel jeugo)
COMMANS_Y =300 # <cordenadas verticales del trio de imagenes (nuevo jeugo,continue,findel jeugo)
#==============================================================================
#==============================================================================
end
module Cache
def self.final(filename)
load_bitmap("Graphics/FTitle/", filename)
end
end
class Scene_Title < Scene_Base
def start
super
load_database
create_game_objects
check_continue
create_title_graphic
create_command_window
@command_window.x = Demyx09::COMMANS_X
@command_window.y = Demyx09::COMMANS_Y
@command_window.opacity = 0
@window_command
play_title_music
@New = Sprite.new
@New.bitmap = Cache.final("FF4NewGame")
@New.x += 20 + @command_window.x
@New.y = @command_window.y+20
if @continue_enabled == true
demyx_conyfin
else
demyx_fin
end
end
def perform_transition
Graphics.transition(20)
end
def post_start
super
open_command_window
end
def pre_terminate
super
close_command_window
end
def terminate
super
@Fin.dispose
@New.dispose
if @continue_enabled == true
@Continuar.dispose
end
dispose_command_window
snapshot_for_background
dispose_title_graphic
end
def update
super
@command_window.update
if Input.trigger?(Input::C)
case @command_window.index
when 0
command_new_game
when 1
if @continue_enabled == true
command_continue
else
command_shutdown
end
when 2
command_shutdown
end
end
end
def check_continue
@continue_enabled = (Dir.glob('Save*.rvdata').size > 0)
end
def create_title_graphic
@sprite = Sprite.new
@sprite.bitmap = Cache.system("Title")
@sprite.z = -50
end
def dispose_title_graphic
@sprite.bitmap.dispose
@sprite.dispose
end
def create_command_window
if @continue_enabled == true
s1 = Vocab::new_game
s2 = ""
s3 = Vocab::shutdown
@command_window = Window_Demyx.new(172, [s1, s2, s3])
@command_window.x = (544 - @command_window.width) / 2
@command_window.y = 288
else
s1 = Vocab::new_game
s2 = Vocab::shutdown
@command_window = Window_Demyx.new(172, [s1, s2])
@command_window.x = (544 - @command_window.width) / 2
@command_window.y = 288
end
if @continue_enabled
@command_window.index = 1
else
end
@command_window.openness = 0
@command_window.open
end
def dispose_command_window
@command_window.dispose
end
def open_command_window
@command_window.open
begin
@command_window.update
Graphics.update
end until @command_window.openness == 255
@command_window.cursor_demyx
end
def close_command_window
@command_window.close
begin
@command_window.update
Graphics.update
end until @command_window.openness == 0
end
def demyx_conyfin
@Continuar = Sprite.new
@Continuar.bitmap = Cache.final("FF4Continuar")
@Continuar.x += 20 + @command_window.x
@Continuar.y = @command_window.y+45
@Fin = Sprite.new
@Fin.bitmap = Cache.final("FF4Fin")
@Fin.x += 20 + @command_window.x
@Fin.y = @command_window.y+70
end
def demyx_fin
@Fin = Sprite.new
@Fin.bitmap = Cache.final("FF4Fin")
@Fin.x += 20 + @command_window.x
@Fin.y = @command_window.y+45
end
end
#==============================================================================
#==============================================================================
class Window_Demyx< Window_Selectable
attr_reader :commands
def initialize(width, commands, column_max = 1, row_max = 0, spacing = 32)
if row_max == 0
row_max = (commands.size + column_max - 1) / column_max
end
super(0, 0, width, row_max * WLH + 32, spacing)
@commands = commands
@item_max = commands.size
@column_max = column_max
@Cu = Sprite.new
@Cu.bitmap = Cache.final("Cursor")
@Cu.opacity = 0
self.index = 0
end
def dispose
@Cu.dispose
end
def item_rect(index)
rect = Rect.new(0, 0, 0, 0)
rect.x = index % @column_max * (rect.width + @spacing)
rect.y = index / @column_max * WLH
@Cu.x = rect.x + self.x
@Cu.y = 23 + rect.y + self.y
return rect
end
end
def cursor_demyx
@Cu.opacity = 222
end
Última edición: