Chaos Project

RPG Maker => RPG Maker Scripts => Topic started by: ForeverZer0 on April 30, 2012, 02:01:34 am

Title: Easy RGSS Video Player
Post by: ForeverZer0 on April 30, 2012, 02:01:34 am
So I was continuing to fool around with MCI functions after completing my little Audio module rewrite, and I found that it also allows for making the most simple video player in RPG Maker. Seriously, it only takes about 15-20 lines of code to get just about any standard video format to play right in the game window.

Here's an example if anyone wants to see how easy it is.

http://www.mediafire.com/?b8gblyim83m772k

God, I wish I understood Win32API functions better back when I used to write more scripts for RMXP, I could have done so much more...
Title: Re: Easy RGSS Video Player
Post by: Zexion on April 30, 2012, 03:09:33 am
The script hangs for me after about 10 seconds ?
Title: Re: Easy RGSS Video Player
Post by: ForeverZer0 on April 30, 2012, 03:17:06 am
Try decreasing the time between Graphic updates to something like 7 or 8. I think I have it set to 9 right now, which is probably a bit too close to the hanging error.

This is the line:
  if Time.now - start_time >= 8


If it doesn't play, you probably don't have the code, but you can swap the video out with one of your own. Either change the name of the file from "Rick.avi" in the script, or change the name of your file to that.
Title: Re: Easy RGSS Video Player
Post by: LiTTleDRAgo on April 30, 2012, 04:01:34 am
the video doesn't play and RMXP window become not responding
Title: Re: Easy RGSS Video Player
Post by: G_G on April 30, 2012, 08:08:05 am
Works fine for me. Just be sure you extract the folder and not run it from the zip file. The only issue with this is that you can't close the RGSS window while the video's running. After a couple of clicks the window freezes for a few seconds and says the "Script is hanging"

EDIT: After doing what you told Zexion to do, it stopped hanging, but you still can't interact with the window during video play.
Title: Re: Easy RGSS Video Player
Post by: ForeverZer0 on April 30, 2012, 10:58:07 am
If you click "C", it will close stop the movie. Thats about it though. It isn't really supposed to be some fully functioning script, just an example.