- 注册时间
- 2005-11-7
- 最后登录
- 2019-5-18
②入门
- 积分
- 38
|
我用66RPG提供的脚本在MAIN前加入以下语句
#==============================================================================
# ■ Scene_Movie
#------------------------------------------------------------------------------
# 处理视频播放画面的类。
#==============================================================================
class Scene_Movie
def initialize(movie,length,exit_to_game=true)
@readini = Win32API.new 'kernel32', 'GetPrivateProfileStringA', %w(p p p p l p), 'l'
@movie_name = Dir.getwd()+"\\Movie\\"+movie
@counter = length
@exit_to_game = exit_to_game
end
def main
game_name = "\0" * 256
@readini.call('Game','Title','',FinalFantsyVIIAC,255,".\\Game.ini")
Final Fantsy VII AC.delete!("\0")
Graphics.transition
@wnd = Win32API.new('user32','FindWindowEx','%w(l,l,p,p)','L')
@temp = @wnd.call(0,0,nil,FinalFantsyVIIAC).to_s
@movie = Win32API.new('winmm','mciSendString','%w(p,p,l,l)','V')
@movie.call("open \""+@PT3+"\" alias FILE style 1073741824 parent " + @temp.to_s,0,0,0)
@message = Win32API.new('user32','SendMessage','%w(l,l,l,l)','V')
@detector = Win32API.new('user32','GetSystemMetrics','%w(l)','L')
@width = @detector.call(0)
if @width == 640
fullscreen
Graphics.update
sleep(1)
Graphics.update
sleep(1)
Graphics.update
sleep(1)
end
@movie.call("play FILE",0,0,0)
loop do
sleep(1)
@message.call(@temp.to_i,11,0,0)
Graphics.update
@message.call(@temp.to_i,11,1,0)
Input.update
if Input.trigger?(Input::B)
break
end
@counter = @counter - 1
if @counter <= 0
break
end
end
@movie.call("close FILE",0,0,0)
if @exit_to_game
$scene = Scene_Map.new
else
$scene = Scene_Title.new
end
Graphics.freeze
if @width == 640
fullscreen
end
end
end
def fullscreen()
$full.call(18,0,0,0)
$full.call(13,0,0,0)
$full.call(18,0,2,0)
$full.call(13,0,2,0)
end
$full = Win32API.new('user32','keybd_event','%w(l,l,l,l)','')
另外,66RPG上说的“在地图上新建事件,在事件插入脚本,"$scene = Scene_Movie.new("你文件名称",30)"即可.30是代表你文件的时间长度~~”,里面的30是指30秒还是30分钟?
但是过了标题菜单后就出现了“语句错误”的提示,请问我是哪里写错了呢?
我是新手,菜鸟中的菜鸟,还请这里的各位高人帮助一下 |
|