Project1
标题:
怎么制作开头视频?
[打印本页]
作者:
暗夜惊戈
时间:
2010-8-26 19:05
提示:
作者被禁止或删除 内容自动屏蔽
作者:
暗夜惊戈
时间:
2010-8-26 19:20
提示:
作者被禁止或删除 内容自动屏蔽
作者:
lxdsh2009
时间:
2010-8-26 19:21
这脚本我用过= =
不知道为啥放不出来= =
作者:
429259591
时间:
2010-8-26 19:22
LZ是想在标题画面前播发还是标题画面后播放?
作者:
暗夜惊戈
时间:
2010-8-26 19:22
提示:
作者被禁止或删除 内容自动屏蔽
作者:
oОS+WEi
时间:
2010-8-26 19:23
这个AVI脚本太麻烦了,我试了N多次都播放不了,建议用FLASH播放器。这个是我唯一成功的脚本
Project4.rar
(1.41 MB, 下载次数: 394)
2010-8-26 19:22 上传
点击文件名下载附件
把文件夹里几个插件拷过去
作者:
abc1236762
时间:
2010-8-26 20:52
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
#_/ ◆ タイトル画面演出 - KGC_TitleDirection ◆
#_/ ◇ Last update : 2007/12/27 ◇
#_/----------------------------------------------------------------------------
#_/ タイトル画面に様々な演出を追加します。
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
#==============================================================================
# ★ カスタマイズ項目 ★
#==============================================================================
module KGC
# ◆BGM の開始タイミング
# 0..ロゴ表示前 1..ロゴ表示後
TD_BGM_TIMING = 1
# ◆テストプレイでもロゴを表示
TD_TESTPLAY_SHOW = false
# ◆スプラッシュロゴ画像ファイル名(nil で解除)
# "Graphics/Titles" から読み込む。
# これを解除すると「ロゴ表示 SE」も無効。
TD_SPLASH_LOGO_FILE = "Logo"
# ◆スプラッシュロゴ表示 SE (nil で解除)
# ファイル名表記 TD_SPLASH_LOGO_SE = "start_logo"
# AudioFile表記 TD_SPLASH_LOGO_SE = RPG::AudioFile.new("start_logo", 80, 100)
# の2方式に対応。
TD_SPLASH_LOGO_SE = nil
# ◆スプラッシュロゴ演出形式
# 0..フェード 1..クロス 2..ズーム 3..スプラッシュ
TD_SPLASH_LOGO_TYPE = 3
# ◆タイトル表示トランジション(nil で解除)
TD_TITLE_TRANSITION = "015-Diamond01"
# ◆タイトルロゴ画像
# "Graphics/Titles" から読み込む。
TD_TITLE_LOGO_IMAGE = "TitleLogo"
# ◆タイトルロゴ演出形式
# 0..フェード 1..クロス 2..ズーム 3..スプラッシュ
TD_TITLE_LOGO_TYPE = 2
# ◆コマンドウィンドウの最大不透明度
TD_WINDOW_OPACITY = 0
# ◆コマンドウィンドウの幅 【単位:ピクセル(px)】
TD_WINDOW_WIDTH = 256
# ◆ニューゲーム項目名
TD_COMMAND_NEWGAME = "始めてみる( ・∀・)ノ"
# ◆コンティニュー項目名
TD_COMMAND_CONTINUE = "ロードしてみる( ゚Д゚)b"
# ◆シャットダウン項目名
TD_COMMAND_SHUTDOWN = "もうやめる(´・ω・`)"
end
#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
$imported = {} if $imported == nil
$imported["TitleDirection"] = true
#==============================================================================
# ■ Sprite_TitleLogo
#==============================================================================
class Sprite_TitleLogo < Sprite
attr_accessor :effect_no_out # 消去エフェクトなし
#--------------------------------------------------------------------------
# ● オブジェクト初期化
#--------------------------------------------------------------------------
def initialize
super
@effect_type = 0
@effect_duration = 0
@effect_sprites = []
@effect_no_out = false
end
#--------------------------------------------------------------------------
# ● 破棄
#--------------------------------------------------------------------------
def dispose
super
dispose_effect_sprites
end
#--------------------------------------------------------------------------
# ● エフェクト用スプライト破棄
#--------------------------------------------------------------------------
def dispose_effect_sprites
@effect_sprites.each { |s|
s.dispose
}
@effect_sprites = []
end
#--------------------------------------------------------------------------
# ● Z 座標変更
#--------------------------------------------------------------------------
def z=(value)
super(value)
@effect_sprites.each { |s| s.z = value }
end
#--------------------------------------------------------------------------
# ● フェード効果
# dx : X 座標
# dy : Y 座標
# bitmap : 表示画像
#--------------------------------------------------------------------------
def effect_fade(dx, dy, bitmap)
dispose_effect_sprites
@effect_type = 0
@effect_duration = 90
# スプライト作成
sprite = Sprite.new
sprite.bitmap = bitmap
# 表示位置を調整
sprite.x = dx
sprite.y = dy
sprite.ox = bitmap.width / 2
sprite.oy = bitmap.height / 2
sprite.opacity = 0
@effect_sprites << sprite
end
#--------------------------------------------------------------------------
# ● クロス効果
#--------------------------------------------------------------------------
def effect_cross(dx, dy, bitmap)
dispose_effect_sprites
@effect_type = 1
@effect_duration = 100
# スプライト作成
sprites = [Sprite.new, Sprite.new]
sprites[0].bitmap = bitmap
sprites[1].bitmap = bitmap
# 表示位置を調整
sprites[0].x = dx - 240
sprites[1].x = dx + 240
sprites[0].y = dy
sprites[1].y = dy
sprites[0].ox = sprites[1].ox = bitmap.width / 2
sprites[0].oy = sprites[1].oy = bitmap.height / 2
sprites[0].opacity = 0
sprites[1].opacity = 0
@effect_sprites += sprites
end
#--------------------------------------------------------------------------
# ● ズーム効果
#--------------------------------------------------------------------------
def effect_zoom(dx, dy, bitmap)
dispose_effect_sprites
@effect_type = 2
@effect_duration = 100
# スプライト作成
sprites = [Sprite.new, Sprite.new]
sprites[0].bitmap = bitmap
sprites[1].bitmap = bitmap
# 初期設定
sprites[0].x = sprites[1].x = dx
sprites[0].y = sprites[1].y = dy
sprites[0].ox = sprites[1].ox = bitmap.width / 2
sprites[0].oy = sprites[1].oy = bitmap.height / 2
sprites[0].zoom_x = sprites[0].zoom_y = 0.0
sprites[1].zoom_x = sprites[1].zoom_y = 5.0
sprites[0].opacity = sprites[1].opacity = 0
@effect_sprites += sprites
end
#--------------------------------------------------------------------------
# ● スプラッシュ効果
#--------------------------------------------------------------------------
def effect_splash(dx, dy, bitmap)
dispose_effect_sprites
@effect_type = 3
@effect_duration = 100
# スプライト作成
sprites = [Sprite.new]
sprites[0].bitmap = bitmap
# 初期設定
sprites[0].ox = bitmap.width >> 1
sprites[0].oy = bitmap.height >> 1
sprites[0].x = dx
sprites[0].y = dy
sprites[0].opacity = 0
(1..3).each { |i|
sprites[i] = Sprite.new
sprites[i].bitmap = bitmap
sprites[i].ox = sprites[0].ox
sprites[i].oy = sprites[0].oy
sprites[i].x = dx
sprites[i].y = dy
sprites[i].opacity = 255
sprites[i].visible = false
}
@effect_sprites += sprites
end
#--------------------------------------------------------------------------
# ● スプラッシュイン効果
#--------------------------------------------------------------------------
def effect_splash_in(dx, dy, bitmap)
dispose_effect_sprites
@effect_type = 4
@effect_duration = 41
# スプライト作成
sprites = [Sprite.new]
sprites[0].bitmap = bitmap
# 初期設定
sprites[0].ox = bitmap.width >> 1
sprites[0].oy = bitmap.height >> 1
sprites[0].x = dx - 160
sprites[0].y = dy - 160
sprites[0].opacity = 0
(1..3).each { |i|
sprites[i] = Sprite.new
sprites[i].bitmap = bitmap
sprites[i].ox = sprites[0].ox
sprites[i].oy = sprites[0].oy
sprites[i].x = dx
sprites[i].y = dy
sprites[i].opacity = 0
}
sprites[1].x += 160
sprites[1].y -= 160
sprites[2].x += 160
sprites[2].y += 160
sprites[3].x -= 160
sprites[3].y += 160
@effect_sprites += sprites
end
#--------------------------------------------------------------------------
# ● エフェクト停止
#--------------------------------------------------------------------------
def stop_effect
dispose_effect_sprites
@effect_duration = 0
end
#--------------------------------------------------------------------------
# ● エフェクト実行中判定
#--------------------------------------------------------------------------
def effect?
return @effect_duration > 0
end
#--------------------------------------------------------------------------
# ● フレーム更新
#--------------------------------------------------------------------------
def update
super
if @effect_duration > 0
update_effect
end
end
#--------------------------------------------------------------------------
# ● エフェクト更新
#--------------------------------------------------------------------------
def update_effect
@effect_duration -= 1
case @effect_type
when 0
update_effect_fade
when 1
update_effect_cross
when 2
update_effect_zoom
when 3
update_effect_splash
when 4
update_effect_splash_in
end
end
#--------------------------------------------------------------------------
# ● エフェクト更新 : フェード
#--------------------------------------------------------------------------
def update_effect_fade
case @effect_duration
when 60...90
@effect_sprites[0].opacity += 9
when 20...60
# 何もしない
when 0...20
unless @effect_no_out
@effect_sprites[0].opacity -= 13
end
end
end
#--------------------------------------------------------------------------
# ● エフェクト更新 : クロス
#--------------------------------------------------------------------------
def update_effect_cross
case @effect_duration
when 60...100
@effect_sprites[0].x += 6
@effect_sprites[1].x -= 6
@effect_sprites[0].opacity += 4
@effect_sprites[1].opacity += 4
when 20...60
@effect_sprites[0].opacity = 255
@effect_sprites[1].visible = false
when 0...20
unless @effect_no_out
@effect_sprites[0].opacity -= 13
end
end
end
#--------------------------------------------------------------------------
# ● エフェクト更新 : ズーム
#--------------------------------------------------------------------------
def update_effect_zoom
case @effect_duration
when 60...100
@effect_sprites[0].zoom_x = (@effect_sprites[0].zoom_y += 0.025)
@effect_sprites[1].zoom_x = (@effect_sprites[1].zoom_y -= 0.1)
@effect_sprites[0].opacity += 3
@effect_sprites[1].opacity += 3
when 20...60
@effect_sprites[0].opacity = 255
@effect_sprites[1].visible = false
when 0...20
unless @effect_no_out
@effect_sprites[0].opacity -= 13
end
end
end
#--------------------------------------------------------------------------
# ● エフェクト更新 : スプラッシュ
#--------------------------------------------------------------------------
def update_effect_splash
case @effect_duration
when 40...80
@effect_sprites[0].opacity += 8
when 0...40
@effect_sprites[0].x -= 4
@effect_sprites[0].y -= 4
@effect_sprites[1].x += 4
@effect_sprites[1].y -= 4
@effect_sprites[2].x += 4
@effect_sprites[2].y += 4
@effect_sprites[3].x -= 4
@effect_sprites[3].y += 4
4.times { |j|
@effect_sprites[j].visible = true
@effect_sprites[j].opacity -= 7
}
end
end
#--------------------------------------------------------------------------
# ● エフェクト更新 : スプラッシュイン
#--------------------------------------------------------------------------
def update_effect_splash_in
case @effect_duration
when 1...41
@effect_sprites[0].x += 4
@effect_sprites[0].y += 4
@effect_sprites[1].x -= 4
@effect_sprites[1].y += 4
@effect_sprites[2].x -= 4
@effect_sprites[2].y -= 4
@effect_sprites[3].x += 4
@effect_sprites[3].y -= 4
4.times { |j|
@effect_sprites[j].opacity += 3
}
when 0
@effect_sprites[0].opacity = 255
(1..3).each { |i|
@effect_sprites[i].visible = false
}
end
end
end
#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
#==============================================================================
# ■ Scene_Title
#==============================================================================
class Scene_Title
@@__splash_executed = false
#--------------------------------------------------------------------------
# ● メイン処理
#--------------------------------------------------------------------------
def main
# 戦闘テストの場合
if $BTEST
battle_test
return
end
load_database
# システムオブジェクトを作成
$game_system = Game_System.new
if KGC::TD_BGM_TIMING == 0
play_title_bgm
end
# ME、BGS の演奏を停止
Audio.me_stop
Audio.bgs_stop
unless @@__splash_executed
show_splash_logo
@@__splash_executed = true
end
if KGC::TD_BGM_TIMING == 1
play_title_bgm
end
# タイトルグラフィックを作成
create_title_graphic
# タイトルロゴを作成
create_title_logo
# コマンドウィンドウを作成
create_command_window
# コンティニュー有効判定
# セーブファイルがひとつでも存在するかどうかを調べる
# 有効なら @continue_enabled を true、無効なら false にする
@continue_enabled = false
for i in 0..3
if FileTest.exist?("Save#{i+1}.rxdata")
@continue_enabled = true
end
end
# コンティニューが有効な場合、カーソルをコンティニューに合わせる
# 無効な場合、コンティニューの文字をグレー表示にする
if @continue_enabled
@command_window.index = 1
else
@command_window.disable_item(1)
end
# トランジション実行
if KGC::TD_TITLE_TRANSITION == nil
Graphics.transition
else
Graphics.transition(40, "Graphics/Transitions/" + KGC::TD_TITLE_TRANSITION)
end
# メインループ
loop {
Graphics.update
Input.update
update
if $scene != self
break
end
}
# トランジション準備
Graphics.freeze
# コマンドウィンドウを解放
@command_window.dispose
# タイトルグラフィックを解放
@title_sprite.bitmap.dispose
@title_sprite.dispose
# タイトルロゴを解放
if @title_logo_sprite != nil
@title_logo_sprite.dispose
end
end
#--------------------------------------------------------------------------
# ● データベースをロード
#--------------------------------------------------------------------------
def 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")
end
#--------------------------------------------------------------------------
# ● タイトル BGM を演奏
#--------------------------------------------------------------------------
def play_title_bgm
$game_system.bgm_play($data_system.title_bgm)
end
#--------------------------------------------------------------------------
# ● スプラッシュロゴ表示
#--------------------------------------------------------------------------
def show_splash_logo
# 表示しない場合は戻る
if KGC::TD_SPLASH_LOGO_FILE == nil || (!KGC::TD_TESTPLAY_SHOW && $DEBUG)
return
end
# ロゴ表示 SE 演奏
if KGC::TD_SPLASH_LOGO_SE != nil
if KGC::TD_SPLASH_LOGO_SE.is_a?(RPG::AudioFile)
$game_system.se_play(KGC::TD_SPLASH_LOGO_SE)
elsif KGC::TD_SPLASH_LOGO_SE.is_a?(String)
Audio.se_play("Audio/SE/" + KGC::TD_SPLASH_LOGO_SE)
end
end
# エフェクト用スプライト作成
sprite = Sprite_TitleLogo.new
bitmap = RPG::Cache.title(KGC::TD_SPLASH_LOGO_FILE)
# 座標指定
dx = 320
dy = 240
# エフェクト準備
case KGC::TD_SPLASH_LOGO_TYPE
when 0
sprite.effect_fade(dx, dy, bitmap)
when 1
sprite.effect_cross(dx, dy, bitmap)
when 2
sprite.effect_zoom(dx, dy, bitmap)
when 3
sprite.effect_splash(dx, dy, bitmap)
end
# エフェクト実行
Graphics.transition(0)
while sprite.effect?
Graphics.update
Input.update
sprite.update
# C ボタンで中止
if Input.trigger?(Input::C)
sprite.stop_effect
end
end
# 後始末
sprite.dispose
# トランジション準備
Graphics.freeze
end
#--------------------------------------------------------------------------
# ● タイトルグラフィック作成
#--------------------------------------------------------------------------
def create_title_graphic
@title_sprite = Sprite.new
@title_sprite.bitmap = RPG::Cache.title($data_system.title_name)
end
#--------------------------------------------------------------------------
# ● タイトルロゴ作成
#--------------------------------------------------------------------------
def create_title_logo
@title_logo_sprite = Sprite_TitleLogo.new
@title_logo_sprite.effect_no_out = true
@title_logo_sprite.z = 100
bitmap = RPG::Cache.title(KGC::TD_TITLE_LOGO_IMAGE)
dx = 320
dy = 40 + bitmap.height / 2
# エフェクト準備
case KGC::TD_TITLE_LOGO_TYPE
when 0
@title_logo_sprite.effect_fade(dx, dy, bitmap)
when 1
@title_logo_sprite.effect_cross(dx, dy, bitmap)
when 2
@title_logo_sprite.effect_zoom(dx, dy, bitmap)
when 3
@title_logo_sprite.effect_splash_in(dx, dy, bitmap)
end
end
#--------------------------------------------------------------------------
# ● コマンドウィンドウ作成
#--------------------------------------------------------------------------
def create_command_window
s = [KGC::TD_COMMAND_NEWGAME,
KGC::TD_COMMAND_CONTINUE,
KGC::TD_COMMAND_SHUTDOWN]
@command_window = Window_Command.new(KGC::TD_WINDOW_WIDTH, s)
@command_window.opacity = 0
@command_window.back_opacity = 160
@command_window.contents_opacity = 0
@command_window.x = 320 - @command_window.width / 2
@command_window.y = 360
end
#--------------------------------------------------------------------------
# ● フレーム更新
#--------------------------------------------------------------------------
alias update_KGC_TitleDirection update
def update
@title_logo_sprite.update
update_KGC_TitleDirection
update_command_window_direction
end
#--------------------------------------------------------------------------
# ● コマンドウィンドウの演出
#--------------------------------------------------------------------------
def update_command_window_direction
@command_window.y -= 2 if @command_window.y > 256
@command_window.opacity =
[@command_window.opacity + 5, KGC::TD_WINDOW_OPACITY].min
@command_window.contents_opacity += 5
end
end
复制代码
作者:
oОS+WEi
时间:
2010-8-26 20:54
回复
abc1236762
的帖子
不是个个都看得懂的,至少贴个使用方法吧
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1