Jump to content
New account registrations are disabed. This website is now an archive. Read more here.
Sign in to follow this  
Zainox

video clips

Recommended Posts

Ive heard a rumor that you cant put any movie files in your game, is this true?

I was gonna have movie clips in my game kinda like how final fantasys have there CGI movie moments.. So is this possable or not?

Share this post


Link to post
Share on other sites

It is, but requires a specialized script. I believe they may have one at CA.

Share this post


Link to post
Share on other sites

Ok.

###########################################################
class Scene_Movie
###########################################################
#Created by SoundSpawn
###########################################################
#Fixed by Popper
###########################################################
#Instruction
#  1) Movies must in in a new folder called Movies in your directory
#  2)If you call this script from and event (EG:	Call Script: $scene = Scene_Movie.new("INTRO") )
#  3) Have fun playin movies with this script!!!
###########################################################
###########################################################
###########################################################

def initialize(movie)
@readini = Win32API.new 'kernel32', 'GetPrivateProfileStringA', %w(p p p p l p), 'l'
@movie_name = Dir.getwd()+"\\Movies\\"+movie+".avi"
main
end

def main
game_name = "\" * 256
@readini.call('Game','Title','',game_name,255,".\\Game.ini")
game_name.delete!("\")
@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(0.1)
Graphics.update
sleep(0.1)
Graphics.update
sleep(0.1)
fullscreen
end


status = " " * 255
movie.call("play FILE",0,0,0)
loop do  
sleep(0.1)
@message.call(@temp.to_i,11,0,0)
Graphics.update
@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)
$scene = Scene_Map.new
break
end
end
$scene = Scene_Map.new
end

end

 

The demo is much easier. You may need help getting this to work.

Share this post


Link to post
Share on other sites

About this... I downloaded your demo, Marked, and when I saw the movie produced it came out rather choppy and laggy. Plus you can't seem to view the movie again once it's been already played.

Share this post


Link to post
Share on other sites

The quality of the movie is not the best, because I quickly just made it for the demo. Open the movies folder and play it in a media player to see what it should look like. On my computer, in RPG Maker XP, it doesnt play well at all, but my computer is really slow. So that may be the problem there.

 

I am unsure why it does not play again. It should...but I don't know how to fix that. Sorry. Where's the scripting teacher when you need him.

 

I also added this to the downloads manager, which no one seems to be using. So, here's an alternate link: http://rmxpunlimited.trap17.com/downloads/download.php?id=4

Share this post


Link to post
Share on other sites

I did view it in media player, and the result you describe is what I'm trying to tell you.

Share this post


Link to post
Share on other sites
I did view it in media player, and the result you describe is what I'm trying to tell you.

That is a good thing. So that means that it's only my video that has bad quality, and that's not anything to do with the script. If your computer is slow though, the video will be laggy.

Share this post


Link to post
Share on other sites
That is a good thing. So that means that it's only my video that has bad quality, and that's not anything to do with the script. If your computer is slow though, the video will be laggy.

 

Wat compression format limitations does the video need? Or can u use anything ur comp can play in avi format?

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...