Per 2016, RMID pindah ke RMID Discord (Invite link dihapus untuk mencegah spambot -Theo @ 2019). Posting sudah tidak bisa dilakukan lagi.
Mohon maaf atas ketidaknyamanannya dan mohon kerjasamanya.
|
|
| Help! Script Error warning. (Movie Script) | |
| 2009-10-26, 16:30 | Help! Script Error warning. (Movie Script) |
---|
Narigane Newbie
Posts : 87 Thanked : 0 Engine : RMVX
| Script buat nampilin movienya gini : - Spoiler:
##Copy this into a new section of your game. ##To play a file, move the mpg file into a "movies" subdirectory ##(yourgame\data, yourgame\graphics, yourgame\movies). ##Then call '$scene = Scene_Movie.new("filename")' where filename is your movies actual filename ## (minus the .mpg). #exapmple Scene_Movie.new("???") ## If you want to play multiple movies in a row ##(for example before the game starts, maybe a "developed by", "produced by", "intro movie" ## set or something... Go to the "main" section of code and find the line "$scene = Scene_Title.new". ##Just after that line add: ##CODE ##Audio.bgm_play("Movies/" + 'dev_by', 100, 100) #loads movie ##Audio.bgm_play("Movies/" + 'pro_b', 100, 100) #loads movie ##Audio.bgm_play("Movies/" + 'intro', 100, 100) #loads movie ##Audio.bgm_stop ##$scene = Scene_Movie.close_scene #closes active movie window ##$scene = Scene_Movie.new("dev_by") ##$scene = Scene_Movie.new("pro_by") ##$scene = Scene_Movie.new("intro") ##$scene = Scene_Title.new class Scene_Movie def initialize(movie) @readini = Win32API.new 'kernel32', 'GetPrivateProfileStringA', %w(p p p p l p), 'l' @movie_name = Dir.getwd()+"\\Movies\\"+movie+".mpg" main end
def main
game_name = "\0" * 256 @readini.call('Game','Title','',game_name,255,".\\Game.ini") game_name.delete!("\0") @wnd = Win32API.new('user32','FindWindowEx','%w(l,l,p,p)','L') @temp = @wnd.call(0,0,nil,game_name).to_s movie = Win32API.new('winmm','mciSendString','%w(p,p,l,l)','V') movie.call("open \""+@movie_name+"\" 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 status = " " * 255 movie.call("play FILE",0,0,0) loop do sleep(0.1) # @message.call(@temp.to_i,11,0,0) #Remove '#' if using RMXP # Graphics.update #Remove '#' if using RMXP @message.call(@temp.to_i,11,1,0) Input.update movie.call("status FILE mode",status,255,0) true_status = status.unpack("aaaa") if true_status.to_s != "play" break end if Input.trigger?(Input::B) #can change or add Input::C Input.update break end end movie.call("close FILE",0,0,0) bail end
def bail 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)','')
def close_scene $keybd = Win32API.new ('user32.dll', 'keybd_event', ['i', 'i', 'l', 'l'], 'v') $keybd.call 0xA4, 0, 0, 0 $keybd.call 0x73, 0, 0, 0 $keybd.call 0x73, 0, 2, 0 $keybd.call 0xA4, 0, 2, 0 end #End Movie Script#
taro script di atas Main dengan nama Scene_Movie ukuranya 680 x 480 buat ganti tipe filenya @movie_name = Dir.getwd()+"\\Movies\\"+movie+".mpg" mpg diganti jadi avi/wmv/dll asal kita punyab codecnya. buat folder "Movies" di folder utama (sejajar ama data/graphic) nama filenya movie Main script diganti gini : - Spoiler:
To make intro movie call script in Main(Script Editor) Put scene_movie above scene_title - Leave Quotes in "" rename movie to your mpg file(exlude .mpg) [Show/Hide] CODE begin # Prepare for transition Graphics.freeze Audio.bgm_play("Movies/" + 'movie', 100, 100) Audio.bgm_stop $scene = Scene_Movie.close_scene #closes active movie window $scene = Scene_Movie.new("movie") $scene = Scene_Title.new# Make scene object (title screen) # Call main method as long as $scene is effective while $scene != nil $scene.main end # Fade out Graphics.transition(20) rescue Errno::ENOENT # Supplement Errno::ENOENT exception # If unable to open file, display message and end filename = $!.message.sub("No such file or directory - ", "") print("Unable to find file #{filename}.") end
MASALAHNYA : Uda beberapa kali di tes bahkan ampe pake file sekecil n serendah mungkin resolusi movienya selalu keluar pesan: Script is hanging trus kalo di klik OK pasti langsung close. Movienya jalan, tapi ya itu selalu keluar mesage itu trus close. awalnya gw kira ada crash ama script laen, tapi bahkan meskipun uda teset new project tetep aja keluar gitu. ada yang tau ngga kira2 kenapa? reijubv mungkin tau? :p |
| | | 2009-10-26, 18:32 | Re: Help! Script Error warning. (Movie Script) |
---|
Notorius Veteran
Posts : 1408 Thanked : 0 Engine : RMVX Skill : Intermediate Type : Event Designer
| Tulisan ini: To make intro movie call script in Main(Script Editor) Put scene_movie above scene_title - Leave Quotes in "" rename movie to your mpg file(exlude .mpg) itu kamu masukin ke dalam main ga? hehehe, just make sure... |
| | | 2009-10-26, 19:18 | Re: Help! Script Error warning. (Movie Script) |
---|
yerry_great @> Moderator
Posts : 1251 Thanked : 15 Engine : Multi-Engine User Skill : Very Beginner Type : Jack of All Trades
| @Not'' kalo misalnya itu dimasukin ke skrip harusnya di kasih tanda " # " kan? biar jadinya comment... |
| | | 2009-10-27, 19:05 | Re: Help! Script Error warning. (Movie Script) |
---|
Narigane Newbie
Posts : 87 Thanked : 0 Engine : RMVX
| uda semua gw ikutin, bahkan lokasi scriptnya uda gw pindah2 juga, dicoba di atas scne2 itu, masih aja eror. semua comment # bahkan gw apus, masih aja tetep gitu. kira2 sekitar 10-15 detik setelah movienya jalan. Apa emang ga didesain buat clip yg pnjang2 ya? Itu Graphic transtition nominalnya ngaruh ngga? uda gw coba ganti angkanya juga ga bisa. |
| | | 2009-10-27, 19:10 | Re: Help! Script Error warning. (Movie Script) |
---|
Notorius Veteran
Posts : 1408 Thanked : 0 Engine : RMVX Skill : Intermediate Type : Event Designer
| Kalo soal Script hanging aku rada ga ngerti kalo ga aku otak atik sendiri... bisanya kalo syntax error / semacamnya... maaf ga bsa bantu, PM aja reijubv ... |
| | | | Re: Help! Script Error warning. (Movie Script) |
---|
Sponsored content
| | | | | Help! Script Error warning. (Movie Script) | |
|
Similar topics | |
|
Similar topics | |
| |
Halaman 1 dari 1 | |
| Permissions in this forum: | Anda tidak dapat menjawab topik
| |
| |
Latest 10 Topics | [Web Novel] Gloria Infidelis 2016-11-17, 21:27 by LightNightKnight
[Announcement] Forum baru untuk RMID 2016-08-25, 16:39 by TheoAllen
Where I'm Wrong ? 2016-07-24, 16:10 by ReydVires
flakeheartnet's Resources part III 2016-07-08, 14:30 by flakeheartnet
Keira's Art Warehouse 2016-06-28, 19:27 by KeiraBlaze
Theo Core Time System + Bingung 2016-06-27, 16:24 by Lockin
Error Script, Maybe ? 2016-06-27, 16:20 by Lockin
Nusaimoe @ RMID Lounge 2016-06-21, 05:02 by Jihad Bagas
Call Random Battle 2016-06-15, 17:04 by Lockin
Flakeheartnet Resources Part II [come back gift] 2016-06-07, 15:51 by flakeheartnet
|
Statistics
|
Members: [ 4947 ]
Topics: [ 8258 ]
Posts: [ 112606 ]
Newest member: [ https://rmid.forumotion.net/u4968 ]
|
|
|
|
|
|