Hi. Found this script to display pics before the opening menu (eg. company ads etc.)
This is the script I found and changed slightly for my picture:
So why is it not working???!!!!!! Is there something wrong with it??!!!
Thanks
This is the script I found and changed slightly for my picture:
Code:
class Scene_Intro
#--------------------------------------------------------------------------
# * Object Initialization
# actor_index : actor index
#--------------------------------------------------------------------------
def initialize
$ads = 0
end
#--------------------------------------------------------------------------
# * Main Processing
#--------------------------------------------------------------------------
def main
# Load database
$data_actors = load_data("Data/Actors.rxdata")
$data_classes = load_data("Data/Classes.rxdata")
$data_skills = load_data("Data/Skills.rxdata")
$data_items = load_data("Data/Items.rxdata")
$data_weapons = load_data("Data/Weapons.rxdata")
$data_armors = load_data("Data/Armors.rxdata")
$data_enemies = load_data("Data/Enemies.rxdata")
$data_troops = load_data("Data/Troops.rxdata")
$data_states = load_data("Data/States.rxdata")
$data_animations = load_data("Data/Animations.rxdata")
$data_tilesets = load_data("Data/Tilesets.rxdata")
$data_common_events = load_data("Data/CommonEvents.rxdata")
$data_system = load_data("Data/System.rxdata")
$game_system = Game_System.new
@window = Window_Intro.new
@frame = 0
Audio.me_stop
Audio.bgs_stop
Graphics.transition
loop do
Graphics.update
Input.update
update
if $scene != self
break
end
end
# Prepare for transition
Graphics.freeze
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
if Graphics.frame_count / Graphics.frame_rate != @total_sec
@frame += 1
@total_sec = Graphics.frame_count / Graphics.frame_rate
end
if @frame >= 5
@window.contents_opacity -= 10
if @window.contents_opacity < 1
if $ads == 1
@window.dispose
$scene = Scene_Title.new
else
$ads +=1
@window.contents_opacity = 255
@frame = 0
@window.refresh
end
end
end
end
end
class Window_Intro < Window_Base
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
super(-16, -16, 672, 512)
self.contents = Bitmap.new(width - 32, height - 32)
self.opacity = 0
refresh
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
bitmap1 = RPG::Cache.picture("digibeet production.jpg")
bitmap = [bitmap1]
self.contents.blt(0, 0, bitmap[$ads], Rect.new(0, 0, 640, 480))
end
end
So why is it not working???!!!!!! Is there something wrong with it??!!!
Thanks