Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Good scripter look here!

Hey I need some help from a good scripter. I got a folder with a avi script in it and a movie file. I wonder if someone could take a look at it and see what´s wrong. It plays good, but there are some problems.
1. There´s no music.
2. It plays too fast.
3. Only half of the movie is seen.
So could someone please just open it up and see what´s wrong and if there´s anything you can do with it?
Is it the avi file it´s wrong with or is it the script?
http://media-convert.com/konverterar/?xid=5-kvjxzxhb
 
Hmm no so that means it´s a error with the avi file. Ok so how can I fix it, I mean change the codec?
Also if I change the codec will all problems be fixed or just some of them?

Thanks fo the reply by the way...
 
If it is with the movie itself, then try re-encoding them.  I usually use Xillsoft Video Converter for the .avi files that I make and have the audio codec at PCM and the video codec to MPEG4.  I actually just tweek around the converter to find the right settings.
 
Hmmm ok, hey dude...could you maybe tweak around a bit with the movie file I put in the movies folder?
Cuz I haven´t got the program you are talking about... :dead:
 
Dude your awesome, everyone you can always count on Sakura Martinez when you need help. He´s a good guy...
by the way, you think it´s big O.o 21 MB is nothing....Ive downloaded a game that was 8 GB now that´s a big file  :tongue2:

Hey by the way Sakura you got msn?

EDIT: Dude I tested it and now it won´t show the movie just play the music. I think it´s the script I´m using. Could you post the script you are using???
 
Sorry, don't use MSN...lol... well, I don't usually download THAT big a file unless I'm using torrents when downloading games for consoles...

Anyways, here's the script I used:
Code:
class Scene_Movie
##Copy this into a new section of your game. 
##To play a file, move the avi file into a "movies" subdirectory (yourgame\data, 
##yourgame\graphics, yourgame\movies). 
##Then call "Scene_Movie.new(filename)" where filename is your movies actual filename
## (minus the .avi).         exp 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
##Scene_Movie.new("dev_by")
##Scene_Movie.new("pro_by")
##Scene_Movie.new("intro")
##$scene = Scene_Movie.new("intro",8,false)assuming the filename of the intro movie is "intro.avi" and it's 8 seconds long.
##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+".avi"
   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)
    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)
      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)','')
 
Ahh shit dude, how did you make it work? Ive made a folder containing the movie file in /data /Graphics and /game. I have even put the file in every folder...and I called it with this line.
Scene_Movie.new("Intro") in a call script...now when i click on the event nothing happens, no error message or anything. How did you make it work??

EDIT: Nevermind I figured it out...
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top