Project1
标题:
如何在进入游戏界面前播放片头FLASH?
[打印本页]
作者:
66isdead
时间:
2011-5-11 20:45
提示:
作者被禁止或删除 内容自动屏蔽
作者:
oОS+WEi
时间:
2011-5-11 20:57
在事件设置中打开脚本选项,然后把它打进去
fls = RMFlash.load("AvB_2.swf",320,240)
fls.x = 160
fls.y = 100
fls.loop = 1
while true
Graphics.update
# Input.update
fls.update
break if !fls.playing?
# break if Input.trigger?(13)
end
fls.dispose
复制代码
AVB_2.swf 改成你动画文件名,320,240 播放动画的屏幕大小
作者:
66isdead
时间:
2011-5-11 21:11
提示:
作者被禁止或删除 内容自动屏蔽
作者:
oОS+WEi
时间:
2011-5-11 21:38
回复
66isdead
的帖子
如果是事件标题的话就直接用事件做,如果是默认的那种标题,就用LOGO脚本,在前面之前先进入某个地图执行事件动画再标题,60行设置开始时的地图,完后再用$scene = Scene_Title.new调回标题
#==============================================================================
# ■ Scene_LOGO
#------------------------------------------------------------------------------
# 处理标题画面的类。
#==============================================================================
class Scene_Logo
#--------------------------------------------------------------------------
# ● 住处理
#--------------------------------------------------------------------------
def main
# 战斗测试的情况下
if $BTEST
battle_test
return
end
# 载入数据库
$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")
$continue_enabled = false
for i in 0..19
if FileTest.exist?("Save/Save#{i}.rxdata")
$continue_enabled = true
end
end
# 如果不是从梦境过来就演奏标题 BGM
if $from_dream_to_title == false
$game_system.bgm_play($data_system.title_bgm)
else
$from_dream_to_title = false
end
Audio.me_stop; Audio.bgs_stop
command_goto_title_map
end
def command_goto_title_map # 生成各种游戏对像并转到Title地图
$game_temp = Game_Temp.new
$game_system = Game_System.new
$game_switches = Game_Switches.new
$game_variables = Game_Variables.new
$game_self_switches = Game_SelfSwitches.new
$game_screen = Game_Screen.new
$game_actors = Game_Actors.new
$game_party = Game_Party.new
$game_troop = Game_Troop.new
$game_map = Game_Map.new
$game_player = Game_Player.new
$game_party.setup_starting_members # 设置初期同伴位置
$game_map.setup(0) # 设置Title的地图
$game_player.moveto(0,0) # 主角向初期位置移动
$game_player.refresh # 刷新主角
$game_map.update # 刷新地图 (执行并行事件)
$title_selecting = true
$scene = Scene_Map.new # 切换地图画面
end
def battle_test
# 载入数据库 (战斗测试用)
$data_actors = load_data("Data/BT_Actors.rxdata")
$data_classes = load_data("Data/BT_Classes.rxdata")
$data_skills = load_data("Data/BT_Skills.rxdata")
$data_items = load_data("Data/BT_Items.rxdata")
$data_weapons = load_data("Data/BT_Weapons.rxdata")
$data_armors = load_data("Data/BT_Armors.rxdata")
$data_enemies = load_data("Data/BT_Enemies.rxdata")
$data_troops = load_data("Data/BT_Troops.rxdata")
$data_states = load_data("Data/BT_States.rxdata")
$data_animations = load_data("Data/BT_Animations.rxdata")
$data_tilesets = load_data("Data/BT_Tilesets.rxdata")
$data_common_events = load_data("Data/BT_CommonEvents.rxdata")
$data_system = load_data("Data/BT_System.rxdata")
# 重置测量游戏时间用的画面计数器
Graphics.frame_count = 0
# 生成各种游戏对像
$game_temp = Game_Temp.new
$game_system = Game_System.new
$game_switches = Game_Switches.new
$game_variables = Game_Variables.new
$game_self_switches = Game_SelfSwitches.new
$game_screen = Game_Screen.new
$game_actors = Game_Actors.new
$game_party = Game_Party.new
$game_troop = Game_Troop.new
$game_map = Game_Map.new
$game_player = Game_Player.new
# 设置战斗测试用同伴
$game_party.setup_battle_test_members
# 设置队伍 ID、可以逃走标志、战斗背景
$game_temp.battle_troop_id = $data_system.test_troop_id
$game_temp.battle_can_escape = true
$game_map.battleback_name = $data_system.battleback_name
# 演奏战斗开始 BGM
$game_system.se_play($data_system.battle_start_se)
# 演奏战斗 BGM
$game_system.bgm_play($game_system.battle_bgm)
# 切换到战斗画面
$scene = Scene_Battle.new
end
end
#==============================================================================
# ■ Main
#------------------------------------------------------------------------------
# 各定义结束后、从这里开始实际处理。
#==============================================================================
begin
# 准备过渡
# 设置系统默认字体
Font.default_name = (["黑体"])
Graphics.freeze
# 生成场景对像 (标题画面)
$DEBUG = true
$scene = Scene_Logo.new
# $scene 为有效的情况下调用 main 过程
while $scene != nil
$scene.main
end
# 淡入淡出
Graphics.transition(20)
rescue Errno::ENOENT
# 补充 Errno::ENOENT 以外错误
# 无法打开文件的情况下、显示信息后结束
filename = $!.message.sub("No such file or directory - ", "")
print("找不到文件 #{filename}。 ")
end
复制代码
作者:
66isdead
时间:
2011-5-11 22:12
提示:
作者被禁止或删除 内容自动屏蔽
作者:
oОS+WEi
时间:
2011-5-11 22:27
回复
66isdead
的帖子
你理解正确,刚给你的脚本在61行填写你一开始想进入的地图的ID,不知道地图的ID的话,在那个地图上右键,地图设置窗口上面有ID,然后在那个地图用事件放动画完后用事件里的脚本执行$scene = Scene_Title.new,切回标题再开始游戏
作者:
66isdead
时间:
2011-5-12 12:27
提示:
作者被禁止或删除 内容自动屏蔽
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1